mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-21 01:40:46 +00:00
Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it easier to find potentially introduced bugs with git bisect.
This commit is contained in:
parent
27bc48e06c
commit
9229ba0fe9
Notes:
sideshowbarker
2024-07-18 22:58:49 +09:00
Author: https://github.com/asynts
Commit: 9229ba0fe9
Pull-request: https://github.com/SerenityOS/serenity/pull/5012
Reviewed-by: https://github.com/alimpfard
14 changed files with 130 additions and 80 deletions
|
@ -25,8 +25,7 @@
|
|||
*/
|
||||
|
||||
#include "Hunks.h"
|
||||
|
||||
// #define DEBUG_HUNKS
|
||||
#include <AK/Debug.h>
|
||||
|
||||
namespace Diff {
|
||||
Vector<Hunk> parse_hunks(const String& diff)
|
||||
|
@ -78,21 +77,19 @@ Vector<Hunk> parse_hunks(const String& diff)
|
|||
hunks.append(hunk);
|
||||
}
|
||||
|
||||
#ifdef DEBUG_HUNKS
|
||||
for (const auto& hunk : hunks) {
|
||||
dbgln("Hunk location:");
|
||||
dbg() << "orig: " << hunk.original_start_line;
|
||||
dbg() << "target: " << hunk.target_start_line;
|
||||
dbgln("removed:");
|
||||
for (const auto& line : hunk.removed_lines) {
|
||||
dbg() << "- " << line;
|
||||
}
|
||||
dbgln("added:");
|
||||
for (const auto& line : hunk.added_lines) {
|
||||
dbg() << "+ " << line;
|
||||
if constexpr (debug_hunks) {
|
||||
for (const auto& hunk : hunks) {
|
||||
dbgln("Hunk location:");
|
||||
dbgln(" orig: {}", hunk.original_start_line);
|
||||
dbgln(" target: {}", hunk.target_start_line);
|
||||
dbgln(" removed:");
|
||||
for (const auto& line : hunk.removed_lines)
|
||||
dbgln("- {}", line);
|
||||
dbgln(" added:");
|
||||
for (const auto& line : hunk.added_lines)
|
||||
dbgln("+ {}", line);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return hunks;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue