summaryrefslogtreecommitdiffstats
path: root/src/Simulator/SimulatorManager.cpp
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2020-10-05 12:27:14 +0200
committerGitHub <noreply@github.com>2020-10-05 12:27:14 +0200
commita9031b6bae742b333b1b390192fa590f2ecb07ea (patch)
treeb2802c81d24d339c201a0747d66ba44e9ea8b1b0 /src/Simulator/SimulatorManager.cpp
parentFixed current end generator (#4968) (diff)
downloadcuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar
cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.gz
cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.bz2
cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.lz
cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.xz
cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.zst
cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.zip
Diffstat (limited to 'src/Simulator/SimulatorManager.cpp')
-rw-r--r--src/Simulator/SimulatorManager.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Simulator/SimulatorManager.cpp b/src/Simulator/SimulatorManager.cpp
index 81044d705..8af56c791 100644
--- a/src/Simulator/SimulatorManager.cpp
+++ b/src/Simulator/SimulatorManager.cpp
@@ -63,12 +63,12 @@ void cSimulatorManager::WakeUp(cChunk & a_Chunk, Vector3i a_Position)
{
ASSERT(a_Chunk.IsValid());
- for (const auto Item : m_Simulators)
+ for (const auto & Item : m_Simulators)
{
Item.first->WakeUp(a_Chunk, a_Position, a_Chunk.GetBlock(a_Position));
}
- for (const auto Offset : cSimulator::AdjacentOffsets)
+ for (const auto & Offset : cSimulator::AdjacentOffsets)
{
auto Relative = a_Position + Offset;
if (!cChunkDef::IsValidHeight(Relative.y))
@@ -86,7 +86,7 @@ void cSimulatorManager::WakeUp(cChunk & a_Chunk, Vector3i a_Position)
// Since they all need this we save them querying it themselves
const auto Block = Chunk->GetBlock(Relative);
- for (const auto Item : m_Simulators)
+ for (const auto & Item : m_Simulators)
{
Item.first->WakeUp(*Chunk, Relative, Offset, Block);
}
@@ -99,7 +99,7 @@ void cSimulatorManager::WakeUp(cChunk & a_Chunk, Vector3i a_Position)
void cSimulatorManager::WakeUp(const cCuboid & a_Area)
{
- for (const auto Item : m_Simulators)
+ for (const auto & Item : m_Simulators)
{
Item.first->WakeUp(a_Area);
}