From 50a908fdc9710ae545d7633c2cb0d40d8ae58b92 Mon Sep 17 00:00:00 2001 From: Lukas Pioch Date: Sat, 19 Dec 2015 22:41:17 +0100 Subject: [PATCH] Fixes for clang-3.7 --- src/Bindings/LuaState.cpp | 2 +- .../IncrementalRedstoneSimulator.cpp | 4 ++-- .../IncrementalRedstoneSimulator/RedstoneComparatorHandler.h | 4 ++-- .../IncrementalRedstoneSimulator/RedstoneWireHandler.h | 2 +- src/Simulator/IncrementalRedstoneSimulator/TNTHandler.h | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Bindings/LuaState.cpp b/src/Bindings/LuaState.cpp index 953b6f17b..40cb19304 100644 --- a/src/Bindings/LuaState.cpp +++ b/src/Bindings/LuaState.cpp @@ -991,7 +991,7 @@ cLuaState::cStackValue cLuaState::WalkToNamedGlobal(const AString & a_Name) lua_pop(m_LuaState, 1); return cStackValue(); } - return std::move(cStackValue(*this)); + return cStackValue(*this); } diff --git a/src/Simulator/IncrementalRedstoneSimulator/IncrementalRedstoneSimulator.cpp b/src/Simulator/IncrementalRedstoneSimulator/IncrementalRedstoneSimulator.cpp index f0a913757..95329f496 100644 --- a/src/Simulator/IncrementalRedstoneSimulator/IncrementalRedstoneSimulator.cpp +++ b/src/Simulator/IncrementalRedstoneSimulator/IncrementalRedstoneSimulator.cpp @@ -124,7 +124,7 @@ void cIncrementalRedstoneSimulator::Simulate(float a_dt) continue; } - auto CurrentHandler = std::move(cIncrementalRedstoneSimulator::CreateComponent(m_World, CurrentBlock, &m_Data)); + auto CurrentHandler = cIncrementalRedstoneSimulator::CreateComponent(m_World, CurrentBlock, &m_Data); if (CurrentHandler == nullptr) { continue; @@ -141,7 +141,7 @@ void cIncrementalRedstoneSimulator::Simulate(float a_dt) } m_World.GetBlockTypeMeta(Location.x, Location.y, Location.z, PotentialBlock, PotentialMeta); - auto PotentialSourceHandler = std::move(cIncrementalRedstoneSimulator::CreateComponent(m_World, PotentialBlock, &m_Data)); + auto PotentialSourceHandler = cIncrementalRedstoneSimulator::CreateComponent(m_World, PotentialBlock, &m_Data); if (PotentialSourceHandler == nullptr) { continue; diff --git a/src/Simulator/IncrementalRedstoneSimulator/RedstoneComparatorHandler.h b/src/Simulator/IncrementalRedstoneSimulator/RedstoneComparatorHandler.h index 1d5f16e9a..78854f2c4 100644 --- a/src/Simulator/IncrementalRedstoneSimulator/RedstoneComparatorHandler.h +++ b/src/Simulator/IncrementalRedstoneSimulator/RedstoneComparatorHandler.h @@ -46,7 +46,7 @@ public: auto RearCoordinate = cBlockComparatorHandler::GetRearCoordinate(a_Position, a_Meta & 0x3); m_World.DoWithBlockEntityAt(RearCoordinate.x, RearCoordinate.y, RearCoordinate.z, CCB); auto RearPower = CCB.m_SignalStrength; - auto PotentialSourceHandler = std::move(cIncrementalRedstoneSimulator::CreateComponent(m_World, m_World.GetBlock(RearCoordinate), static_cast(m_World.GetRedstoneSimulator())->GetChunkData())); + auto PotentialSourceHandler = cIncrementalRedstoneSimulator::CreateComponent(m_World, m_World.GetBlock(RearCoordinate), static_cast(m_World.GetRedstoneSimulator())->GetChunkData()); if (PotentialSourceHandler != nullptr) { BLOCKTYPE Type; @@ -83,7 +83,7 @@ public: UNUSED(a_BlockType); auto RearCoordinate = cBlockComparatorHandler::GetRearCoordinate(a_Position, a_Meta & 0x3); - auto PotentialSourceHandler = std::move(cIncrementalRedstoneSimulator::CreateComponent(m_World, m_World.GetBlock(RearCoordinate), static_cast(m_World.GetRedstoneSimulator())->GetChunkData())); + auto PotentialSourceHandler = cIncrementalRedstoneSimulator::CreateComponent(m_World, m_World.GetBlock(RearCoordinate), static_cast(m_World.GetRedstoneSimulator())->GetChunkData()); if (PotentialSourceHandler != nullptr) { BLOCKTYPE Type; diff --git a/src/Simulator/IncrementalRedstoneSimulator/RedstoneWireHandler.h b/src/Simulator/IncrementalRedstoneSimulator/RedstoneWireHandler.h index fbf6eb646..697bbe7dd 100644 --- a/src/Simulator/IncrementalRedstoneSimulator/RedstoneWireHandler.h +++ b/src/Simulator/IncrementalRedstoneSimulator/RedstoneWireHandler.h @@ -37,7 +37,7 @@ public: cVector3iArray RelativePositions; bool IsYPTerracingBlocked = cBlockInfo::IsSolid(m_World.GetBlock(a_Position + OffsetYP())); - for (const auto Adjacent : GetRelativeLaterals()) + for (const auto & Adjacent : GetRelativeLaterals()) { if ( !IsYPTerracingBlocked && diff --git a/src/Simulator/IncrementalRedstoneSimulator/TNTHandler.h b/src/Simulator/IncrementalRedstoneSimulator/TNTHandler.h index f51e39a17..a4dce30c6 100644 --- a/src/Simulator/IncrementalRedstoneSimulator/TNTHandler.h +++ b/src/Simulator/IncrementalRedstoneSimulator/TNTHandler.h @@ -42,7 +42,7 @@ public: LOGD("Evaluating explodinator the trinitrotoluene (%d %d %d)", a_Position.x, a_Position.y, a_Position.z); if (a_PoweringData.PowerLevel != 0) { - m_World.BroadcastSoundEffect("game.tnt.primed", (double)a_Position.x, (double)a_Position.y, (double)a_Position.z, 0.5f, 0.6f); + m_World.BroadcastSoundEffect("game.tnt.primed", static_cast(a_Position.x), static_cast(a_Position.y), static_cast(a_Position.z), 0.5f, 0.6f); m_World.SetBlock(a_Position.x, a_Position.y, a_Position.z, E_BLOCK_AIR, 0); m_World.SpawnPrimedTNT(a_Position.x + 0.5, a_Position.y + 0.5, a_Position.z + 0.5); // 80 ticks to boom }