summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/TreeView.cpp
diff options
context:
space:
mode:
authorGunnar Beutner <gbeutner@serenityos.org>2021-05-01 21:10:08 +0200
committerAndreas Kling <kling@serenityos.org>2021-05-01 21:25:06 +0200
commit6cf59b6ae96aeeb8c0da957a07f913c4fa38467f (patch)
treeb3f1691b59c3280993d4a8c2866f821ae15c1875 /Userland/Libraries/LibGUI/TreeView.cpp
parent4e6f03a860595f9eb2628e12ddbd333e26b0622f (diff)
downloadserenity-6cf59b6ae96aeeb8c0da957a07f913c4fa38467f.zip
Everywhere: Turn #if *_DEBUG into dbgln_if/if constexpr
Diffstat (limited to 'Userland/Libraries/LibGUI/TreeView.cpp')
-rw-r--r--Userland/Libraries/LibGUI/TreeView.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/Userland/Libraries/LibGUI/TreeView.cpp b/Userland/Libraries/LibGUI/TreeView.cpp
index 53019815e2..01e50f089f 100644
--- a/Userland/Libraries/LibGUI/TreeView.cpp
+++ b/Userland/Libraries/LibGUI/TreeView.cpp
@@ -238,9 +238,8 @@ void TreeView::paint_event(PaintEvent& event)
auto rect = a_rect.translated(0, y_offset);
auto toggle_rect = a_toggle_rect.translated(0, y_offset);
-#if ITEM_RECTS_DEBUG
- painter.fill_rect(rect, Color::WarmGray);
-#endif
+ if constexpr (ITEM_RECTS_DEBUG)
+ painter.fill_rect(rect, Color::WarmGray);
bool is_selected_row = selection().contains(index);