From a211527b4b247863042d1beec7fb4367a748b7c6 Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Fri, 7 Aug 2020 09:58:36 +0300 Subject: [PATCH] Fix AppVeyor warnings --- apps/openmw/mwmechanics/aiavoiddoor.cpp | 8 ++++---- apps/openmw/mwscript/miscextensions.cpp | 4 ++-- apps/openmw/mwscript/scriptmanagerimp.cpp | 2 -- components/sdlutil/sdlvideowrapper.cpp | 1 - 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/apps/openmw/mwmechanics/aiavoiddoor.cpp b/apps/openmw/mwmechanics/aiavoiddoor.cpp index ce25537564..73a6385638 100644 --- a/apps/openmw/mwmechanics/aiavoiddoor.cpp +++ b/apps/openmw/mwmechanics/aiavoiddoor.cpp @@ -60,14 +60,14 @@ bool MWMechanics::AiAvoidDoor::execute (const MWWorld::Ptr& actor, CharacterCont // Make all nearby actors also avoid the door std::vector actors; MWBase::Environment::get().getMechanicsManager()->getActorsInRange(pos.asVec3(),100,actors); - for(auto& actor : actors) + for(auto& neighbor : actors) { - if (actor == getPlayer()) + if (neighbor == getPlayer()) continue; - MWMechanics::AiSequence& seq = actor.getClass().getCreatureStats(actor).getAiSequence(); + MWMechanics::AiSequence& seq = neighbor.getClass().getCreatureStats(neighbor).getAiSequence(); if (seq.getTypeId() != MWMechanics::AiPackageTypeId::AvoidDoor) - seq.stack(MWMechanics::AiAvoidDoor(mDoorPtr), actor); + seq.stack(MWMechanics::AiAvoidDoor(mDoorPtr), neighbor); } return false; diff --git a/apps/openmw/mwscript/miscextensions.cpp b/apps/openmw/mwscript/miscextensions.cpp index cbacd62df9..8ce891741c 100644 --- a/apps/openmw/mwscript/miscextensions.cpp +++ b/apps/openmw/mwscript/miscextensions.cpp @@ -563,9 +563,9 @@ namespace MWScript effects += store.getMagicEffects(); } - for (const auto& effect : effects) + for (const auto& activeEffect : effects) { - if (effect.first.mId == key && effect.second.getModifier() > 0) + if (activeEffect.first.mId == key && activeEffect.second.getModifier() > 0) { runtime.push(1); return; diff --git a/apps/openmw/mwscript/scriptmanagerimp.cpp b/apps/openmw/mwscript/scriptmanagerimp.cpp index 8ff768c2d1..e1652b311c 100644 --- a/apps/openmw/mwscript/scriptmanagerimp.cpp +++ b/apps/openmw/mwscript/scriptmanagerimp.cpp @@ -149,8 +149,6 @@ namespace MWScript int count = 0; int success = 0; - const MWWorld::Store& scripts = mStore.get(); - for (auto& script : mStore.get()) { if (!std::binary_search (mScriptBlacklist.begin(), mScriptBlacklist.end(), diff --git a/components/sdlutil/sdlvideowrapper.cpp b/components/sdlutil/sdlvideowrapper.cpp index 57d1e2985c..b3ba98ee3c 100644 --- a/components/sdlutil/sdlvideowrapper.cpp +++ b/components/sdlutil/sdlvideowrapper.cpp @@ -102,7 +102,6 @@ namespace SDLUtil int w = 0; int h = 0; auto index = SDL_GetWindowDisplayIndex(mWindow); - bool reposition = false; SDL_GetDisplayBounds(index, &rect); SDL_GetWindowSize(mWindow, &w, &h);