From d7ee4607041e9a86d263a55c2180a4ad40f41bd2 Mon Sep 17 00:00:00 2001
From: Norman Feske <norman.feske@genode-labs.com>
Date: Sat, 28 Oct 2023 12:30:40 +0200
Subject: [PATCH] list_model.h: rename 'apply_first' to 'with_first'

Issue #4317
---
 repos/base/include/util/list_model.h      | 10 +++++-----
 repos/os/include/decorator/window_stack.h |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/repos/base/include/util/list_model.h b/repos/base/include/util/list_model.h
index da849b8fdf..96af8f93bc 100644
--- a/repos/base/include/util/list_model.h
+++ b/repos/base/include/util/list_model.h
@@ -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));
diff --git a/repos/os/include/decorator/window_stack.h b/repos/os/include/decorator/window_stack.h
index be4609d2ce..636b3de00b 100644
--- a/repos/os/include/decorator/window_stack.h
+++ b/repos/os/include/decorator/window_stack.h
@@ -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;