From 72ae5ecb5a5a8585935be6a954f480a406550b5c Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Fri, 28 Aug 2020 21:22:44 +0100 Subject: ChunkMap: do not wantonly make empty chunks - Removed calls that constructed an empty chunk, found it was invalid, and did nothing with said chunk Partially addresses #2324 --- src/LineBlockTracer.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/LineBlockTracer.cpp') diff --git a/src/LineBlockTracer.cpp b/src/LineBlockTracer.cpp index 6160f8485..49eba9ac8 100644 --- a/src/LineBlockTracer.cpp +++ b/src/LineBlockTracer.cpp @@ -287,12 +287,8 @@ bool cLineBlockTracer::ChunkCallback(cChunk * a_Chunk) // This is the actual line tracing loop. for (;;) { - // Report the current block through the callbacks: - if (a_Chunk == nullptr) - { - m_Callbacks->OnNoChunk(); - return false; - } + // Our caller (DoWithChunk callback) should never give nothing: + ASSERT(a_Chunk != nullptr); // Move to next block if (!MoveToNextBlock()) @@ -324,6 +320,7 @@ bool cLineBlockTracer::ChunkCallback(cChunk * a_Chunk) return false; } + // Report the current block through the callbacks: if (a_Chunk->IsValid()) { BLOCKTYPE BlockType; -- cgit v1.2.3