os/include: use C++20 function template syntax

Issue #5227
This commit is contained in:
Norman Feske
2024-05-22 17:22:53 +02:00
committed by Christian Helmuth
parent 5e862b2cd3
commit cfd013a01a
32 changed files with 183 additions and 293 deletions

View File

@ -98,8 +98,7 @@ struct Capture::Session : Genode::Session
Rect rects[NUM_RECTS];
template <typename FN>
void for_each_rect(FN const &fn) const
void for_each_rect(auto const &fn) const
{
for (unsigned i = 0; i < NUM_RECTS; i++)
if (rects[i].valid())

View File

@ -83,11 +83,7 @@ class Capture::Connection::Screen
size(size), _connection(connection), _ds(rm, _connection.dataspace())
{ }
template <typename FN>
void with_texture(FN const &fn) const
{
fn(_texture);
}
void with_texture(auto const &fn) const { fn(_texture); }
void apply_to_surface(Surface<Pixel> &surface)
{