summaryrefslogtreecommitdiffstats
path: root/src/BlockArea.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/BlockArea.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/BlockArea.cpp')
-rw-r--r--src/BlockArea.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/BlockArea.cpp b/src/BlockArea.cpp
index 1b714d640..b32851afc 100644
--- a/src/BlockArea.cpp
+++ b/src/BlockArea.cpp
@@ -2163,7 +2163,7 @@ size_t cBlockArea::MakeIndexForSize(Vector3i a_RelPos, Vector3i a_Size)
-bool cBlockArea::DoWithBlockEntityRelAt(int a_RelX, int a_RelY, int a_RelZ, cItemCallback<cBlockEntity> & a_Callback)
+bool cBlockArea::DoWithBlockEntityRelAt(int a_RelX, int a_RelY, int a_RelZ, cBlockEntityCallback a_Callback)
{
ASSERT(IsValidRelCoords(a_RelX, a_RelY, a_RelZ));
if (!HasBlockEntities())
@@ -2176,14 +2176,14 @@ bool cBlockArea::DoWithBlockEntityRelAt(int a_RelX, int a_RelY, int a_RelZ, cIte
{
return false;
}
- return a_Callback.Item(itr->second);
+ return a_Callback(*itr->second);
}
-bool cBlockArea::DoWithBlockEntityAt(int a_BlockX, int a_BlockY, int a_BlockZ, cItemCallback<cBlockEntity> & a_Callback)
+bool cBlockArea::DoWithBlockEntityAt(int a_BlockX, int a_BlockY, int a_BlockZ, cBlockEntityCallback a_Callback)
{
return DoWithBlockEntityRelAt(a_BlockX - m_Origin.x, a_BlockY - m_Origin.y, a_BlockZ - m_Origin.z, a_Callback);
}
@@ -2192,7 +2192,7 @@ bool cBlockArea::DoWithBlockEntityAt(int a_BlockX, int a_BlockY, int a_BlockZ, c
-bool cBlockArea::ForEachBlockEntity(cItemCallback<cBlockEntity> & a_Callback)
+bool cBlockArea::ForEachBlockEntity(cBlockEntityCallback a_Callback)
{
if (!HasBlockEntities())
{
@@ -2200,7 +2200,7 @@ bool cBlockArea::ForEachBlockEntity(cItemCallback<cBlockEntity> & a_Callback)
}
for (auto & keyPair: *m_BlockEntities)
{
- if (a_Callback.Item(keyPair.second))
+ if (a_Callback(*keyPair.second))
{
return false;
}