mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-07 11:27:29 +00:00
parent
0f686a774d
commit
d7ee460704
@ -143,15 +143,15 @@ class Genode::List_model : Noncopyable
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply functor 'fn' to the first element of the list model
|
||||
* Call functor 'fn' with the first element of the list model
|
||||
*
|
||||
* Using this method combined with the 'Element::next' method, the list
|
||||
* model can be traversed manually. This is handy in situations where
|
||||
* the list-model elements are visited via recursive function calls
|
||||
* Using this method combined with 'Element::next', the list model
|
||||
* can be traversed manually. This is handy in situations where the
|
||||
* list-model elements are visited via recursive function calls
|
||||
* instead of a 'for_each' loop.
|
||||
*/
|
||||
template <typename FN>
|
||||
void apply_first(FN const &fn) const
|
||||
void with_first(FN const &fn) const
|
||||
{
|
||||
if (Element const *e = _elements.first())
|
||||
fn(static_cast<ELEM const &>(*e));
|
||||
|
@ -79,7 +79,7 @@ class Decorator::Window_stack : public Window_base::Draw_behind_fn
|
||||
Dirty_rect result = _dirty_rect;
|
||||
|
||||
_dirty_rect.flush([&] (Rect const &rect) {
|
||||
_windows.apply_first([&] (Window_base const &first) {
|
||||
_windows.with_first([&] (Window_base const &first) {
|
||||
_draw_rec(canvas, &first, rect); }); });
|
||||
|
||||
return result;
|
||||
|
Loading…
x
Reference in New Issue
Block a user