From 6c618eb072bc76fb4ea1cabc79d307139aaa24a1 Mon Sep 17 00:00:00 2001 From: Hendiadyoin1 Date: Thu, 15 Apr 2021 22:14:27 +0200 Subject: [PATCH] HexEditor: Use debgln_if --- Userland/Applications/HexEditor/HexEditor.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/Userland/Applications/HexEditor/HexEditor.cpp b/Userland/Applications/HexEditor/HexEditor.cpp index f41a2e3259..6fe7514c73 100644 --- a/Userland/Applications/HexEditor/HexEditor.cpp +++ b/Userland/Applications/HexEditor/HexEditor.cpp @@ -223,9 +223,7 @@ void HexEditor::mousedown_event(GUI::MouseEvent& event) if (offset < 0 || offset >= static_cast(m_buffer.size())) return; -#if HEX_DEBUG - outln("HexEditor::mousedown_event(hex): offset={}", offset); -#endif + dbgln_if(HEX_DEBUG, "HexEditor::mousedown_event(hex): offset={}", offset); m_edit_mode = EditMode::Hex; m_byte_position = 0; @@ -245,9 +243,7 @@ void HexEditor::mousedown_event(GUI::MouseEvent& event) if (offset < 0 || offset >= static_cast(m_buffer.size())) return; -#if HEX_DEBUG - outln("HexEditor::mousedown_event(text): offset={}", offset); -#endif + dbgln_if(HEX_DEBUG, "HexEditor::mousedown_event(text): offset={}", offset); m_position = offset; m_byte_position = 0; @@ -345,9 +341,7 @@ void HexEditor::scroll_position_into_view(int position) void HexEditor::keydown_event(GUI::KeyEvent& event) { -#if HEX_DEBUG - outln("HexEditor::keydown_event key={}", static_cast(event.key())); -#endif + dbgln_if(HEX_DEBUG, "HexEditor::keydown_event key={}", static_cast(event.key())); if (event.key() == KeyCode::Key_Up) { if (m_position - bytes_per_row() >= 0) {