diff --git a/client/ClientCommandManager.cpp b/client/ClientCommandManager.cpp index a4878dccf..e894d4b99 100644 --- a/client/ClientCommandManager.cpp +++ b/client/ClientCommandManager.cpp @@ -272,7 +272,7 @@ void ClientCommandManager::handleGetScriptsCommand() boost::filesystem::create_directories(outPath); - for(auto & kv : VLC->scriptHandler->objects) + for(const auto & kv : VLC->scriptHandler->objects) { std::string name = kv.first; boost::algorithm::replace_all(name,":","_"); diff --git a/client/render/Canvas.cpp b/client/render/Canvas.cpp index 8d8939d76..1e6bd290d 100644 --- a/client/render/Canvas.cpp +++ b/client/render/Canvas.cpp @@ -188,7 +188,7 @@ void Canvas::fillTexture(const std::shared_ptr& image) if (!image) return; - Rect imageArea = Rect(Point(0, 0), image->dimensions()); + Rect imageArea(Point(0, 0), image->dimensions()); for (int y=0; y < surface->h; y+= imageArea.h) { for (int x=0; x < surface->w; x+= imageArea.w) diff --git a/client/windows/CHeroBackpackWindow.cpp b/client/windows/CHeroBackpackWindow.cpp index 250f4d00f..608465b5e 100644 --- a/client/windows/CHeroBackpackWindow.cpp +++ b/client/windows/CHeroBackpackWindow.cpp @@ -21,7 +21,7 @@ #include "CPlayerInterface.h" CHeroBackpackWindow::CHeroBackpackWindow(const CGHeroInstance * hero) - : CStatusbarWindow((EOptions)0) + : CStatusbarWindow(0) { OBJECT_CONSTRUCTION_CAPTURING(255 - DISPOSE); @@ -49,7 +49,7 @@ void CHeroBackpackWindow::showAll(Canvas & to) } CHeroQuickBackpackWindow::CHeroQuickBackpackWindow(const CGHeroInstance * hero, ArtifactPosition targetSlot) - : CWindowObject((EOptions)0) + : CWindowObject(0) { OBJECT_CONSTRUCTION_CAPTURING(255 - DISPOSE); diff --git a/lib/CCreatureSet.cpp b/lib/CCreatureSet.cpp index e1aef1d67..ec3016e1e 100644 --- a/lib/CCreatureSet.cpp +++ b/lib/CCreatureSet.cpp @@ -992,7 +992,7 @@ ArtBearer::ArtBearer CCommanderInstance::bearerType() const bool CCommanderInstance::gainsLevel() const { - return experience >= static_cast(VLC->heroh->reqExp(level + 1)); + return experience >= VLC->heroh->reqExp(level + 1); } //This constructor should be placed here to avoid side effects diff --git a/lib/pathfinder/PathfinderOptions.h b/lib/pathfinder/PathfinderOptions.h index 973135e30..4a1d4b985 100644 --- a/lib/pathfinder/PathfinderOptions.h +++ b/lib/pathfinder/PathfinderOptions.h @@ -24,8 +24,8 @@ struct DLL_LINKAGE PathfinderOptions { bool useFlying; bool useWaterWalking; - bool useEmbarkAndDisembark; bool ignoreGuards; + bool useEmbarkAndDisembark; bool useTeleportTwoWay; // Two-way monoliths and Subterranean Gate bool useTeleportOneWay; // One-way monoliths with one known exit only bool useTeleportOneWayRandom; // One-way monoliths with more than one known exit