summaryrefslogtreecommitdiffstats
path: root/src/LineBlockTracer.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-08-28 22:22:44 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2020-08-28 22:22:44 +0200
commit72ae5ecb5a5a8585935be6a954f480a406550b5c (patch)
treeef4acd137953ca2ddf56ffd834196403c841783e /src/LineBlockTracer.cpp
parentRemove unneeded MarkDirty, SendToClients parameters of SetMeta (diff)
downloadcuberite-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 '')
-rw-r--r--src/LineBlockTracer.cpp9
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;