LibCore: Wrap commented out debug messages in a preprocessor define

We can also remove an outdated FIXME as dbg() does now support unsigned
longs :^)
This commit is contained in:
Shannon Booth 2020-03-22 14:11:00 +13:00 committed by Andreas Kling
parent 757c14650f
commit 83425b1ac0
Notes: sideshowbarker 2024-07-19 08:11:21 +09:00

View file

@ -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,