diff options
author | AnotherTest <ali.mpfard@gmail.com> | 2021-02-24 02:05:43 +0330 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-24 13:07:28 +0100 |
commit | 857cdee0d0e88a2681126ce564b61ad337a7f898 (patch) | |
tree | 2e706b9a395f75af01dfa3b99c793424c1f645d6 /Userland | |
parent | 71de5433f8b2c97ccc289b656a626b070b744a47 (diff) | |
download | serenity-857cdee0d0e88a2681126ce564b61ad337a7f898.zip |
AK: Make dbgln_if() avoid evaluating the arguments when disabled
Naturally, this makes the `enabled` flag on dbgln() obsolete.
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibCpp/Parser.cpp | 2 | ||||
-rw-r--r-- | Userland/Services/WindowServer/WindowManager.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibCpp/Parser.cpp b/Userland/Libraries/LibCpp/Parser.cpp index f3081ac0ae..1a592a4ff3 100644 --- a/Userland/Libraries/LibCpp/Parser.cpp +++ b/Userland/Libraries/LibCpp/Parser.cpp @@ -714,7 +714,7 @@ void Parser::error(StringView message) m_tokens[m_state.token_index].m_start.column); } m_errors.append(formatted_message); - dbgln<CPP_DEBUG>("{}", formatted_message); + dbgln_if(CPP_DEBUG, "{}", formatted_message); } bool Parser::match_expression() diff --git a/Userland/Services/WindowServer/WindowManager.cpp b/Userland/Services/WindowServer/WindowManager.cpp index d3901a3131..a4a84fe82c 100644 --- a/Userland/Services/WindowServer/WindowManager.cpp +++ b/Userland/Services/WindowServer/WindowManager.cpp @@ -589,7 +589,7 @@ bool WindowManager::process_ongoing_window_resize(const MouseEvent& event, Windo auto max_rect = maximized_window_rect(*m_resize_window); if (event.y() > max_rect.bottom()) { - dbgln<RESIZE_DEBUG>("Should Maximize vertically"); + dbgln_if(RESIZE_DEBUG, "Should Maximize vertically"); m_resize_window->set_vertically_maximized(); m_resize_window = nullptr; m_resizing_mouse_button = MouseButton::None; |