From f7887ab05f86908c45f9d9e701152914df706089 Mon Sep 17 00:00:00 2001 From: Capostrophic <21265616+Capostrophic@users.noreply.github.com> Date: Thu, 26 Jul 2018 23:24:26 +0300 Subject: [PATCH] Fix MSVC C4456 warning: declaration of 'stats' hides previous local declaration --- apps/openmw/mwworld/worldimp.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 6bf964d9b..66eee963d 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -2778,7 +2778,7 @@ namespace MWWorld // For AI actors, get combat targets to use in the ray cast. Only those targets will return a positive hit result. std::vector targetActors; if (!actor.isEmpty() && actor != MWMechanics::getPlayer() && !manualSpell) - actor.getClass().getCreatureStats(actor).getAiSequence().getCombatTargets(targetActors); + stats.getAiSequence().getCombatTargets(targetActors); const float fCombatDistance = getStore().get().find("fCombatDistance")->getFloat(); @@ -2801,7 +2801,6 @@ namespace MWWorld // Actors that are targeted by this actor's Follow or Escort packages also side with them if (actor != MWMechanics::getPlayer()) { - const MWMechanics::CreatureStats &stats = actor.getClass().getCreatureStats(actor); for (std::list::const_iterator it = stats.getAiSequence().begin(); it != stats.getAiSequence().end(); ++it) { if ((*it)->getTypeId() == MWMechanics::AiPackage::TypeIdCast)