summaryrefslogtreecommitdiffstats
path: root/src/LineBlockTracer.cpp
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2017-09-11 23:20:49 +0200
committerMattes D <github@xoft.cz>2017-09-11 23:20:49 +0200
commite225b7f8262df48ad4d7094bc295add3007b0649 (patch)
treea42e9afcc88cfe6e9d1258458e3ad42764083d0e /src/LineBlockTracer.cpp
parentcBlockArea: change MakeIndex to return size_t (diff)
downloadcuberite-e225b7f8262df48ad4d7094bc295add3007b0649.tar
cuberite-e225b7f8262df48ad4d7094bc295add3007b0649.tar.gz
cuberite-e225b7f8262df48ad4d7094bc295add3007b0649.tar.bz2
cuberite-e225b7f8262df48ad4d7094bc295add3007b0649.tar.lz
cuberite-e225b7f8262df48ad4d7094bc295add3007b0649.tar.xz
cuberite-e225b7f8262df48ad4d7094bc295add3007b0649.tar.zst
cuberite-e225b7f8262df48ad4d7094bc295add3007b0649.zip
Diffstat (limited to 'src/LineBlockTracer.cpp')
-rw-r--r--src/LineBlockTracer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/LineBlockTracer.cpp b/src/LineBlockTracer.cpp
index 471d9e13b..e194ae653 100644
--- a/src/LineBlockTracer.cpp
+++ b/src/LineBlockTracer.cpp
@@ -199,12 +199,12 @@ bool cLineBlockTracer::Trace(double a_StartX, double a_StartY, double a_StartZ,
m_DiffY = m_EndY - m_StartY;
m_DiffZ = m_EndZ - m_StartZ;
- // The actual trace is handled with ChunkMapCS locked by calling our Item() for the specified chunk
+ // The actual trace is handled with ChunkMapCS locked by calling our ChunkCallback for the specified chunk
int BlockX = FloorC(m_StartX);
int BlockZ = FloorC(m_StartZ);
int ChunkX, ChunkZ;
cChunkDef::BlockToChunk(BlockX, BlockZ, ChunkX, ChunkZ);
- return m_World->DoWithChunk(ChunkX, ChunkZ, *this);
+ return m_World->DoWithChunk(ChunkX, ChunkZ, [this](cChunk & a_Chunk) { return ChunkCallback(&a_Chunk); });
}
@@ -308,7 +308,7 @@ bool cLineBlockTracer::MoveToNextBlock(void)
-bool cLineBlockTracer::Item(cChunk * a_Chunk)
+bool cLineBlockTracer::ChunkCallback(cChunk * a_Chunk)
{
ASSERT((m_CurrentY >= 0) && (m_CurrentY < cChunkDef::Height)); // This should be provided by FixStartAboveWorld() / FixStartBelowWorld()