From a9031b6bae742b333b1b390192fa590f2ecb07ea Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Mon, 5 Oct 2020 11:27:14 +0100 Subject: Fix cmake not adding Werror on clang, and _lots_ of warnings (#4963) * Fix cmake not adding Werror on clang, and _lots_ of warnings * WIP: Build fixes * Cannot make intermediate blockhandler instance * Tiger's changes * Fix BitIndex check * Handle invalid NextState values in cMultiVersionProtocol Co-authored-by: Tiger Wang --- src/Simulator/IncrementalRedstoneSimulator/ForEachSourceCallback.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Simulator/IncrementalRedstoneSimulator/ForEachSourceCallback.cpp') diff --git a/src/Simulator/IncrementalRedstoneSimulator/ForEachSourceCallback.cpp b/src/Simulator/IncrementalRedstoneSimulator/ForEachSourceCallback.cpp index 4c676b405..d5433f25a 100644 --- a/src/Simulator/IncrementalRedstoneSimulator/ForEachSourceCallback.cpp +++ b/src/Simulator/IncrementalRedstoneSimulator/ForEachSourceCallback.cpp @@ -74,7 +74,7 @@ void ForEachSourceCallback::CheckIndirectPower() ForEachSourceCallback QuasiQueryCallback(m_Chunk, Above, m_Chunk.GetBlock(Above)); // Manually feed the callback object all positions that may deliver power to Above: - for (const auto QuasiPowerOffset : cSimulator::GetLinkedOffsets(OffsetYP)) + for (const auto & QuasiPowerOffset : cSimulator::GetLinkedOffsets(OffsetYP)) { QuasiQueryCallback(m_Position + QuasiPowerOffset); } @@ -116,7 +116,7 @@ PowerLevel ForEachSourceCallback::QueryLinkedPower(const cChunk & Chunk, const V PowerLevel Power = 0; // Loop through all linked powerable offsets in the direction requested: - for (const auto Offset : cSimulator::GetLinkedOffsets(SolidBlockPosition - QueryPosition)) + for (const auto & Offset : cSimulator::GetLinkedOffsets(SolidBlockPosition - QueryPosition)) { auto SourcePosition = QueryPosition + Offset; if (!cChunk::IsValidHeight(SourcePosition.y)) -- cgit v1.2.3