1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:17:35 +00:00

Everywhere: Debug macros instead of constexpr.

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/dbgln<debug_([a-z_]+)>/dbgln<\U\1_DEBUG>/' {} \;

    find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/if constexpr \(debug_([a-z0-9_]+)/if constexpr \(\U\1_DEBUG/' {} \;
This commit is contained in:
asynts 2021-01-23 23:59:27 +01:00 committed by Andreas Kling
parent bb483f7ef4
commit 8465683dcf
98 changed files with 414 additions and 972 deletions

View file

@ -102,7 +102,7 @@ static Optional<ByteBuffer> get_gzip_payload(const ByteBuffer& data)
}
auto new_size = data.size() - current;
dbgln<debug_gzip>("get_gzip_payload: Returning slice from {} with size {}", current, new_size);
dbgln<GZIP_DEBUG>("get_gzip_payload: Returning slice from {} with size {}", current, new_size);
return data.slice(current, new_size);
}
@ -110,7 +110,7 @@ Optional<ByteBuffer> Gzip::decompress(const ByteBuffer& data)
{
ASSERT(is_compressed(data));
dbgln<debug_gzip>("Gzip::decompress: Decompressing gzip compressed data. size={}", data.size());
dbgln<GZIP_DEBUG>("Gzip::decompress: Decompressing gzip compressed data. size={}", data.size());
auto optional_payload = get_gzip_payload(data);
if (!optional_payload.has_value()) {
return Optional<ByteBuffer>();
@ -122,7 +122,7 @@ Optional<ByteBuffer> Gzip::decompress(const ByteBuffer& data)
while (true) {
unsigned long destination_len = destination.size();
if constexpr (debug_gzip) {
if constexpr (GZIP_DEBUG) {
dbgln("Gzip::decompress: Calling puff()");
dbgln(" destination_data = {}", destination.data());
dbgln(" destination_len = {}", destination_len);