From c7926b2212cb3b26c173565b324629950e84d949 Mon Sep 17 00:00:00 2001 From: "Psychpsyo (Cameron)" <60073468+Psychpsyo@users.noreply.github.com> Date: Mon, 24 Mar 2025 10:47:14 +0100 Subject: [PATCH] LibWeb: Change while to for loop --- Libraries/LibWeb/Painting/DisplayList.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Libraries/LibWeb/Painting/DisplayList.cpp b/Libraries/LibWeb/Painting/DisplayList.cpp index 70f3751cb4a..b5644dcb769 100644 --- a/Libraries/LibWeb/Painting/DisplayList.cpp +++ b/Libraries/LibWeb/Painting/DisplayList.cpp @@ -43,10 +43,9 @@ void DisplayListPlayer::execute(DisplayList& display_list) VERIFY(m_surface); - size_t next_command_index = 0; - while (next_command_index < commands.size()) { - auto scroll_frame_id = commands[next_command_index].scroll_frame_id; - auto command = commands[next_command_index++].command; + for (size_t command_index = 0; command_index < commands.size(); command_index++) { + auto scroll_frame_id = commands[command_index].scroll_frame_id; + auto command = commands[command_index].command; if (command.has()) { auto& paint_scroll_bar = command.get();