1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 13:07: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:
asynts 2021-01-11 13:32:26 +01:00 committed by Andreas Kling
parent 6fa42af567
commit 843ebbd2c3
15 changed files with 46 additions and 21 deletions

View file

@ -170,8 +170,13 @@ static bool check_size(const IntSize& size, BitmapFormat format, unsigned actual
unsigned expected_size_max = round_up_to_power_of_two(expected_size_min, PAGE_SIZE);
if (expected_size_min > actual_size || actual_size > expected_size_max) {
// Getting here is most likely an error.
dbg() << "Constructing a shared bitmap for format " << (int)format << " and size " << size << ", which demands " << expected_size_min << " bytes, which rounds up to at most " << expected_size_max << ".";
dbg() << "However, we were given " << actual_size << " bytes, which is outside this range?! Refusing cowardly.";
dbgln("Constructing a shared bitmap for format {} and size {}, which demands {} bytes, which rounds up to at most {}.",
static_cast<int>(format),
size,
expected_size_min,
expected_size_max);
dbgln("However, we were given {} bytes, which is outside this range?! Refusing cowardly.", actual_size);
return false;
}
return true;

View file

@ -167,7 +167,7 @@ size_t BitmapFont::glyph_count_by_type(FontTypes type)
if (type == FontTypes::LatinExtendedA)
return 384;
dbg() << "Unknown font type:" << type;
dbgln("Unknown font type: {}", (int)type);
ASSERT_NOT_REACHED();
}

View file

@ -62,7 +62,7 @@ bool decode(Decoder& decoder, Gfx::ShareableBitmap& shareable_bitmap)
if (shbuf_id == -1)
return true;
dbg() << "Decoding a ShareableBitmap with shbuf_id=" << shbuf_id << ", size=" << size;
dbgln("Decoding a ShareableBitmap with shbuf_id={}, size={}", shbuf_id, size);
auto shared_buffer = SharedBuffer::create_from_shbuf_id(shbuf_id);
if (!shared_buffer)

View file

@ -79,7 +79,7 @@ RefPtr<SharedBuffer> load_system_theme(const String& path)
case (int)MetricRole::TitleButtonWidth:
return 15;
default:
dbg() << "Metric " << name << " has no fallback value!";
dbgln("Metric {} has no fallback value!", name);
return 16;
}
}