1
0
mirror of https://github.com/SerenityOS/serenity synced 2024-07-09 09:40:45 +00:00

HackStudio: Fix a misuse of dbgln() intended as dbgln_if()

This currently works accidentally, just because there's an overload for
`dbgln<bool>(...)` - it just bypasses the compiletime checks.
This commit is contained in:
AnotherTest 2021-02-23 09:23:11 +03:30 committed by Andreas Kling
parent 644d981b2b
commit 29c8d34be7

View File

@ -163,7 +163,7 @@ void Editor::show_documentation_tooltip_if_available(const String& hovered_token
return;
}
dbgln(EDITOR_DEBUG, "opening {}", it->value);
dbgln_if(EDITOR_DEBUG, "opening {}", it->value);
auto file = Core::File::construct(it->value);
if (!file->open(Core::File::ReadOnly)) {
dbgln("failed to open {}, {}", it->value, file->error_string());