diff --git a/AI/VCAI/AIUtility.cpp b/AI/VCAI/AIUtility.cpp index 37ad79386..887f4757a 100644 --- a/AI/VCAI/AIUtility.cpp +++ b/AI/VCAI/AIUtility.cpp @@ -1,6 +1,7 @@ #include "StdInc.h" #include "AIUtility.h" #include "VCAI.h" +#include "Fuzzy.h" #include "../../lib/UnlockGuard.h" #include "../../lib/CConfigHandler.h" diff --git a/AI/VCAI/StdInc.h b/AI/VCAI/StdInc.h index 6448c2288..e0eeaf0aa 100644 --- a/AI/VCAI/StdInc.h +++ b/AI/VCAI/StdInc.h @@ -1,4 +1,2 @@ #pragma once #include "../../Global.h" - -#include "Fuzzy.h" diff --git a/AI/VCAI/VCAI.cpp b/AI/VCAI/VCAI.cpp index fbf9f1831..b0477fcf8 100644 --- a/AI/VCAI/VCAI.cpp +++ b/AI/VCAI/VCAI.cpp @@ -1,6 +1,8 @@ #include "StdInc.h" #include "VCAI.h" #include "Goals.h" +#include "Fuzzy.h" + #include "../../lib/UnlockGuard.h" #include "../../lib/mapObjects/MapObjects.h" #include "../../lib/CConfigHandler.h" diff --git a/lib/mapObjects/MiscObjects.cpp b/lib/mapObjects/MiscObjects.cpp index d5e9fa2d8..fcd7071db 100644 --- a/lib/mapObjects/MiscObjects.cpp +++ b/lib/mapObjects/MiscObjects.cpp @@ -1061,7 +1061,7 @@ void CGObservatory::onHeroVisit( const CGHeroInstance * h ) const case Obj::COVER_OF_DARKNESS: { iw.text.addTxt (MetaString::ADVOB_TXT, 31); - for (auto player : cb->gameState()->players) + for (auto & player : cb->gameState()->players) { if (cb->getPlayerStatus(player.first) == EPlayerStatus::INGAME && cb->getPlayerRelations(player.first, h->tempOwner) == PlayerRelations::ENEMIES) diff --git a/server/CGameHandler.cpp b/server/CGameHandler.cpp index 93bcbc02b..7684404e4 100644 --- a/server/CGameHandler.cpp +++ b/server/CGameHandler.cpp @@ -1351,7 +1351,7 @@ void CGameHandler::newTurn() } if (t->hasBonusOfType (Bonus::DARKNESS)) { - for (auto player : gameState()->players) + for (auto & player : gameState()->players) { if (getPlayerStatus(player.first) == EPlayerStatus::INGAME && getPlayerRelations(player.first, t->tempOwner) == PlayerRelations::ENEMIES)