diff --git a/apps/openmw/mwmechanics/aiavoiddoor.cpp b/apps/openmw/mwmechanics/aiavoiddoor.cpp index ce2553756..73a638563 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 cbacd62df..8ce891741 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 8ff768c2d..e1652b311 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 57d1e2985..b3ba98ee3 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);