Everywhere: Turn #if *_DEBUG into dbgln_if/if constexpr

This commit is contained in:
Gunnar Beutner 2021-05-01 21:10:08 +02:00 committed by Andreas Kling
commit 6cf59b6ae9
Notes: sideshowbarker 2024-07-18 18:47:59 +09:00
58 changed files with 315 additions and 469 deletions

View file

@ -222,17 +222,15 @@ Optional<Text> Text::parse(const StringView& str)
current_link_is_actually_img = true;
break;
case '[':
#if MARKDOWN_DEBUG
if (first_span_in_the_current_link != -1)
dbgln("Dropping the outer link");
#endif
if constexpr (MARKDOWN_DEBUG) {
if (first_span_in_the_current_link != -1)
dbgln("Dropping the outer link");
}
first_span_in_the_current_link = spans.size();
break;
case ']': {
if (first_span_in_the_current_link == -1) {
#if MARKDOWN_DEBUG
dbgln("Unmatched ]");
#endif
dbgln_if(MARKDOWN_DEBUG, "Unmatched ]");
continue;
}
ScopeGuard guard = [&] {