1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:07:35 +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-16 13:43:08 +01:00 committed by Andreas Kling
parent 9229ba0fe9
commit d69a8a9958
3 changed files with 68 additions and 51 deletions

View file

@ -26,6 +26,7 @@
#include <AK/Array.h>
#include <AK/ByteBuffer.h>
#include <AK/Debug.h>
#include <AK/LexicalPath.h>
#include <AK/MappedFile.h>
#include <AK/MemoryStream.h>
@ -36,8 +37,6 @@
#include <stdio.h>
#include <string.h>
//#define GIF_DEBUG
namespace Gfx {
// Row strides and offsets for each interlace pass.
@ -213,16 +212,16 @@ public:
}
if (m_current_code > m_code_table.size()) {
#ifdef GIF_DEBUG
dbg() << "Corrupted LZW stream, invalid code: " << m_current_code << " at bit index: "
<< m_current_bit_index << ", code table size: " << m_code_table.size();
#endif
dbgln<debug_gif>("Corrupted LZW stream, invalid code: {} at bit index {}, code table size: {}",
m_current_code,
m_current_bit_index,
m_code_table.size());
return {};
} else if (m_current_code == m_code_table.size() && m_output.is_empty()) {
#ifdef GIF_DEBUG
dbg() << "Corrupted LZW stream, valid new code but output buffer is empty: " << m_current_code
<< " at bit index: " << m_current_bit_index << ", code table size: " << m_code_table.size();
#endif
dbgln<debug_gif>("Corrupted LZW stream, valid new code but output buffer is empty: {} at bit index {}, code table size: {}",
m_current_code,
m_current_bit_index,
m_code_table.size());
return {};
}
@ -528,16 +527,12 @@ static bool load_gif_frame_descriptors(GIFLoadingContext& context)
if (extension_type == 0xFF) {
if (sub_block.size() != 14) {
#ifdef GIF_DEBUG
dbg() << "Unexpected application extension size: " << sub_block.size();
#endif
dbgln<debug_gif>("Unexpected application extension size: {}", sub_block.size());
continue;
}
if (sub_block[11] != 1) {
#ifdef GIF_DEBUG
dbgln("Unexpected application extension format");
#endif
dbgln<debug_gif>("Unexpected application extension format");
continue;
}