diff options
author | asynts <asynts@gmail.com> | 2021-01-23 23:52:21 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-01-25 09:47:36 +0100 |
commit | bb483f7ef4693582d34aa7a30fa2916fdcc8b6f4 (patch) | |
tree | f3c5fe1ff819534ffd94abea15170fbfc07d44a5 /Userland/DevTools | |
parent | acdcf59a333b0fe9a709ee53b2a82b26b346b747 (diff) | |
download | serenity-bb483f7ef4693582d34aa7a30fa2916fdcc8b6f4.zip |
Everywhere: Name debug macros more consistently.
Personally, I prefer the naming convention DEBUG_FOO over FOO_DEBUG, but
the majority of the debug macros are already named in the latter naming
convention, so I just enforce consistency here.
This was done with the following script:
find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/DEBUG_PATH/PATH_DEBUG/' {} \;
Diffstat (limited to 'Userland/DevTools')
4 files changed, 8 insertions, 8 deletions
diff --git a/Userland/DevTools/HackStudio/CursorTool.cpp b/Userland/DevTools/HackStudio/CursorTool.cpp index 15fbce04d9..30899dba16 100644 --- a/Userland/DevTools/HackStudio/CursorTool.cpp +++ b/Userland/DevTools/HackStudio/CursorTool.cpp @@ -36,7 +36,7 @@ namespace HackStudio { void CursorTool::on_mousedown(GUI::MouseEvent& event) { -#if DEBUG_CURSOR_TOOL +#if CURSOR_TOOL_DEBUG dbgln("CursorTool::on_mousedown"); #endif auto& form_widget = m_editor.form_widget(); @@ -73,7 +73,7 @@ void CursorTool::on_mousedown(GUI::MouseEvent& event) void CursorTool::on_mouseup(GUI::MouseEvent& event) { -#if DEBUG_CURSOR_TOOL +#if CURSOR_TOOL_DEBUG dbgln("CursorTool::on_mouseup"); #endif if (event.button() == GUI::MouseButton::Left) { @@ -94,7 +94,7 @@ void CursorTool::on_mouseup(GUI::MouseEvent& event) void CursorTool::on_mousemove(GUI::MouseEvent& event) { -#if DEBUG_CURSOR_TOOL +#if CURSOR_TOOL_DEBUG dbgln("CursorTool::on_mousemove"); #endif auto& form_widget = m_editor.form_widget(); @@ -133,7 +133,7 @@ void CursorTool::on_mousemove(GUI::MouseEvent& event) void CursorTool::on_keydown(GUI::KeyEvent& event) { -#if DEBUG_CURSOR_TOOL +#if CURSOR_TOOL_DEBUG dbgln("CursorTool::on_keydown"); #endif diff --git a/Userland/DevTools/HackStudio/LanguageServers/Cpp/ClientConnection.cpp b/Userland/DevTools/HackStudio/LanguageServers/Cpp/ClientConnection.cpp index 0f1eb1d228..c0555560e1 100644 --- a/Userland/DevTools/HackStudio/LanguageServers/Cpp/ClientConnection.cpp +++ b/Userland/DevTools/HackStudio/LanguageServers/Cpp/ClientConnection.cpp @@ -104,7 +104,7 @@ void ClientConnection::handle(const Messages::LanguageServer::FileEditInsertText } GUI::TextPosition start_position { (size_t)message.start_line(), (size_t)message.start_column() }; document->insert_at(start_position, message.text(), &s_default_document_client); -#if DEBUG_FILE_CONTENT +#if FILE_CONTENT_DEBUG dbgln("{}", document->text()); #endif } @@ -129,7 +129,7 @@ void ClientConnection::handle(const Messages::LanguageServer::FileEditRemoveText }; document->remove(range); -#if DEBUG_FILE_CONTENT +#if FILE_CONTENT_DEBUG dbgln("{}", document->text()); #endif } diff --git a/Userland/DevTools/HackStudio/LanguageServers/Shell/ClientConnection.cpp b/Userland/DevTools/HackStudio/LanguageServers/Shell/ClientConnection.cpp index 93b2b11a65..0ae5a0c469 100644 --- a/Userland/DevTools/HackStudio/LanguageServers/Shell/ClientConnection.cpp +++ b/Userland/DevTools/HackStudio/LanguageServers/Shell/ClientConnection.cpp @@ -104,7 +104,7 @@ void ClientConnection::handle(const Messages::LanguageServer::FileEditInsertText } GUI::TextPosition start_position { (size_t)message.start_line(), (size_t)message.start_column() }; document->insert_at(start_position, message.text(), &s_default_document_client); -#if DEBUG_FILE_CONTENT +#if FILE_CONTENT_DEBUG dbgln("{}", document->text()); #endif } diff --git a/Userland/DevTools/UserspaceEmulator/Emulator.cpp b/Userland/DevTools/UserspaceEmulator/Emulator.cpp index f9f0a04eab..ef72f6d04a 100644 --- a/Userland/DevTools/UserspaceEmulator/Emulator.cpp +++ b/Userland/DevTools/UserspaceEmulator/Emulator.cpp @@ -343,7 +343,7 @@ void Emulator::dump_backtrace() u32 Emulator::virt_syscall(u32 function, u32 arg1, u32 arg2, u32 arg3) { -#if DEBUG_SPAM +#if SPAM_DEBUG reportln("Syscall: {} ({:x})", Syscall::to_string((Syscall::Function)function), function); #endif switch (function) { |