diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2020-08-28 22:22:44 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2020-08-28 22:22:44 +0200 |
commit | 72ae5ecb5a5a8585935be6a954f480a406550b5c (patch) | |
tree | ef4acd137953ca2ddf56ffd834196403c841783e /src/LineBlockTracer.cpp | |
parent | Remove unneeded MarkDirty, SendToClients parameters of SetMeta (diff) | |
download | cuberite-72ae5ecb5a5a8585935be6a954f480a406550b5c.tar cuberite-72ae5ecb5a5a8585935be6a954f480a406550b5c.tar.gz cuberite-72ae5ecb5a5a8585935be6a954f480a406550b5c.tar.bz2 cuberite-72ae5ecb5a5a8585935be6a954f480a406550b5c.tar.lz cuberite-72ae5ecb5a5a8585935be6a954f480a406550b5c.tar.xz cuberite-72ae5ecb5a5a8585935be6a954f480a406550b5c.tar.zst cuberite-72ae5ecb5a5a8585935be6a954f480a406550b5c.zip |
Diffstat (limited to 'src/LineBlockTracer.cpp')
-rw-r--r-- | src/LineBlockTracer.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
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; |