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

@ -37,8 +37,7 @@ class Trace_buffer
/**
* Call functor for each entry that wasn't yet processed
*/
template <typename FUNC>
void for_each_new_entry(FUNC && functor, bool update = true)
void for_each_new_entry(auto const &fn, bool update = true)
{
using namespace Genode;
@ -72,7 +71,7 @@ class Trace_buffer
continue;
/* functor may return false to continue processing later on */
if (!functor(entry))
if (!fn(entry))
break;
}