base-*: omit () for lambas w/o argument

Issue #5227
This commit is contained in:
Norman Feske
2024-06-28 16:35:57 +02:00
parent a2b0553c51
commit 361557e1f0
33 changed files with 128 additions and 128 deletions

View File

@@ -75,13 +75,13 @@ class Genode::Connection_base : Noncopyable, Interface
{
enum { UPGRADE_ATTEMPTS = ~0U };
return Genode::retry<Out_of_ram>(
[&] () {
[&] {
return Genode::retry<Out_of_caps>(
[&] () { return fn(); },
[&] () { upgrade_caps(caps.value); },
[&] { return fn(); },
[&] { upgrade_caps(caps.value); },
UPGRADE_ATTEMPTS);
},
[&] () { upgrade_ram(ram.value); },
[&] { upgrade_ram(ram.value); },
UPGRADE_ATTEMPTS);
}
};

View File

@@ -80,8 +80,8 @@ class Genode::Page_table_allocator
table.~TABLE();
_free((unsigned)(_offset(table) / sizeof(TABLE)));
},
[&] () {
Genode::error("Trying to destruct foreign table at ", Genode::Hex(phys_addr));
[&] {
Genode::error("Trying to destruct foreign table at ", Genode::Hex(phys_addr));
});
}

View File

@@ -296,7 +296,7 @@ class Genode::Page_directory
table.insert_translation(vo - (vo & PAGE_MASK), pa, size,
flags, alloc, flush, supported_sizes);
},
[&] () {
[&] {
error("Unable to get mapped table address for ",
Genode::Hex(Td::Pa::masked(desc)));
});
@@ -334,7 +334,7 @@ class Genode::Page_directory
desc = 0;
}
},
[&] () {
[&] {
error("Unable to get mapped table address for ",
Genode::Hex(table_phys));
});
@@ -490,7 +490,7 @@ class Genode::Pml4_table
table.insert_translation(table_vo, pa, size, flags, alloc,
flush, supported_sizes);
},
[&] () {
[&] {
error("Unable to get mapped table address for ",
Genode::Hex(table_phys));
});
@@ -525,7 +525,7 @@ class Genode::Pml4_table
clflush(&desc);
}
},
[&] () {
[&] {
error("Unable to get mapped table address for ",
Genode::Hex(table_phys));
});

View File

@@ -307,12 +307,12 @@ class Genode::Xml_generator
}
}
void node(char const *name, auto const &fn = [] () { } )
void node(char const *name, auto const &fn = [] { } )
{
Node(*this, name, fn);
}
void node(char const *name) { Node(*this, name, [] () { }); }
void node(char const *name) { Node(*this, name, [] { }); }
void attribute(char const *name, char const *str)
{

View File

@@ -108,12 +108,12 @@ struct Genode::Vm_connection : Connection<Vm_session>, Rpc_client<Vm_session>
auto with_upgrade(auto const &fn) -> decltype(fn())
{
return Genode::retry<Genode::Out_of_ram>(
[&] () {
[&] {
return Genode::retry<Genode::Out_of_caps>(
[&] () { return fn(); },
[&] () { this->upgrade_caps(2); });
[&] { return fn(); },
[&] { this->upgrade_caps(2); });
},
[&] () { this->upgrade_ram(4096); }
[&] { this->upgrade_ram(4096); }
);
}
@@ -124,7 +124,7 @@ struct Genode::Vm_connection : Connection<Vm_session>, Rpc_client<Vm_session>
void attach(Dataspace_capability ds, addr_t vm_addr, Attach_attr attr) override
{
with_upgrade([&] () {
with_upgrade([&] {
call<Rpc_attach>(ds, vm_addr, attr); });
}