diff options
author | Shannon Booth <shannon.ml.booth@gmail.com> | 2020-03-22 14:11:00 +1300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-03-22 08:51:40 +0100 |
commit | 83425b1ac0cd1665dc18bd373c4241fb414386ab (patch) | |
tree | 83fac275bde1810610cf3b2c98dd9ef3ff39e9dd | |
parent | 757c14650f7db67dabfba0ad9490ea78faeef3fe (diff) | |
download | serenity-83425b1ac0cd1665dc18bd373c4241fb414386ab.zip |
LibCore: Wrap commented out debug messages in a preprocessor define
We can also remove an outdated FIXME as dbg() does now support unsigned
longs :^)
-rw-r--r-- | Libraries/LibCore/Gzip.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Libraries/LibCore/Gzip.cpp b/Libraries/LibCore/Gzip.cpp index 85c2fe0836..0f1f8581be 100644 --- a/Libraries/LibCore/Gzip.cpp +++ b/Libraries/LibCore/Gzip.cpp @@ -31,6 +31,8 @@ #include <limits.h> #include <stddef.h> +//#define DEBUG_GZIP + namespace Core { bool Gzip::is_compressed(const ByteBuffer& data) @@ -119,12 +121,14 @@ Optional<ByteBuffer> Gzip::decompress(const ByteBuffer& data) auto destination = ByteBuffer::create_uninitialized(1024); while (true) { unsigned long destination_len = destination.size(); - // FIXME: dbg() cannot take ulong? - // dbg() << "Gzip::decompress: Calling puff()\n" - // << " destination_data = " << destination.data() << "\n" - // << " destination_len = " << (int)destination_len << "\n" - // << " source_data = " << source.data() << "\n" - // << " source_len = " << (int)source_len; + +#ifdef DEBUG_GZIP + dbg() << "Gzip::decompress: Calling puff()\n" + << " destination_data = " << destination.data() << "\n" + << " destination_len = " << destination_len << "\n" + << " source_data = " << source.data() << "\n" + << " source_len = " << source_len; +#endif auto puff_ret = puff( destination.data(), &destination_len, |