diff options
author | LogicParrot <LogicParrot@users.noreply.github.com> | 2017-09-02 12:35:22 +0200 |
---|---|---|
committer | LogicParrot <LogicParrot@users.noreply.github.com> | 2017-09-02 12:35:22 +0200 |
commit | 07a5bf0984559d04fce1091b82b0952217ac64cc (patch) | |
tree | 0d1eee372a782213c9e2b84deaefe717b379a04b /src/BlockArea.cpp | |
parent | Skeletons (diff) | |
parent | Revert "Replace ItemCallbacks with lambdas (#3948)" (diff) | |
download | cuberite-07a5bf0984559d04fce1091b82b0952217ac64cc.tar cuberite-07a5bf0984559d04fce1091b82b0952217ac64cc.tar.gz cuberite-07a5bf0984559d04fce1091b82b0952217ac64cc.tar.bz2 cuberite-07a5bf0984559d04fce1091b82b0952217ac64cc.tar.lz cuberite-07a5bf0984559d04fce1091b82b0952217ac64cc.tar.xz cuberite-07a5bf0984559d04fce1091b82b0952217ac64cc.tar.zst cuberite-07a5bf0984559d04fce1091b82b0952217ac64cc.zip |
Diffstat (limited to 'src/BlockArea.cpp')
-rw-r--r-- | src/BlockArea.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/BlockArea.cpp b/src/BlockArea.cpp index 755d98583..667a231a4 100644 --- a/src/BlockArea.cpp +++ b/src/BlockArea.cpp @@ -1,4 +1,4 @@ - + // BlockArea.cpp // NOTE: compile.sh checks for this file in order to determine if this is the Cuberite folder. @@ -2239,7 +2239,7 @@ int cBlockArea::MakeIndex(int a_RelX, int a_RelY, int a_RelZ) const -bool cBlockArea::DoWithBlockEntityRelAt(int a_RelX, int a_RelY, int a_RelZ, const cBlockEntityCallback & a_Callback) +bool cBlockArea::DoWithBlockEntityRelAt(int a_RelX, int a_RelY, int a_RelZ, cItemCallback<cBlockEntity> & a_Callback) { ASSERT(IsValidRelCoords(a_RelX, a_RelY, a_RelZ)); if (!HasBlockEntities()) @@ -2252,14 +2252,14 @@ bool cBlockArea::DoWithBlockEntityRelAt(int a_RelX, int a_RelY, int a_RelZ, cons { return false; } - return a_Callback(*itr->second); + return a_Callback.Item(itr->second); } -bool cBlockArea::DoWithBlockEntityAt(int a_BlockX, int a_BlockY, int a_BlockZ, const cBlockEntityCallback & a_Callback) +bool cBlockArea::DoWithBlockEntityAt(int a_BlockX, int a_BlockY, int a_BlockZ, cItemCallback<cBlockEntity> & a_Callback) { return DoWithBlockEntityRelAt(a_BlockX - m_Origin.x, a_BlockY - m_Origin.y, a_BlockZ - m_Origin.z, a_Callback); } @@ -2268,7 +2268,7 @@ bool cBlockArea::DoWithBlockEntityAt(int a_BlockX, int a_BlockY, int a_BlockZ, c -bool cBlockArea::ForEachBlockEntity(const cBlockEntityCallback & a_Callback) +bool cBlockArea::ForEachBlockEntity(cItemCallback<cBlockEntity> & a_Callback) { if (!HasBlockEntities()) { @@ -2276,7 +2276,7 @@ bool cBlockArea::ForEachBlockEntity(const cBlockEntityCallback & a_Callback) } for (auto & keyPair: *m_BlockEntities) { - if (a_Callback(*keyPair.second)) + if (a_Callback.Item(keyPair.second)) { return false; } |