diff --git a/apps/mwiniimporter/importer.cpp b/apps/mwiniimporter/importer.cpp index f2fcdb711..fb3144814 100644 --- a/apps/mwiniimporter/importer.cpp +++ b/apps/mwiniimporter/importer.cpp @@ -824,8 +824,8 @@ void MwIniImporter::importArchives(multistrmap &cfg, const multistrmap &ini) con // does not appears in the ini file cfg["fallback-archive"].push_back("Morrowind.bsa"); - for(std::vector::const_iterator it=archives.begin(); it!=archives.end(); ++it) { - cfg["fallback-archive"].push_back(*it); + for(std::vector::const_iterator iter=archives.begin(); iter!=archives.end(); ++iter) { + cfg["fallback-archive"].push_back(*iter); } } @@ -865,8 +865,8 @@ void MwIniImporter::importGameFiles(multistrmap &cfg, const multistrmap &ini, co // this will sort files by time order first, then alphabetical (maybe), I suspect non ASCII filenames will be stuffed. sort(contentFiles.begin(), contentFiles.end()); - for(std::vector >::const_iterator it=contentFiles.begin(); it!=contentFiles.end(); ++it) { - cfg["content"].push_back(it->second); + for(std::vector >::const_iterator iter=contentFiles.begin(); iter!=contentFiles.end(); ++iter) { + cfg["content"].push_back(iter->second); } } diff --git a/apps/openmw/mwgui/class.cpp b/apps/openmw/mwgui/class.cpp index ab7290e87..e1f5a165e 100644 --- a/apps/openmw/mwgui/class.cpp +++ b/apps/openmw/mwgui/class.cpp @@ -193,9 +193,8 @@ namespace MWGui const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore(); - std::vector > items; // class id, class name - MWWorld::Store::iterator it = store.get().begin(); - for (; it != store.get().end(); ++it) + std::vector > items; // class id, class name + for (MWWorld::Store::iterator it = store.get().begin(); it != store.get().end(); ++it) { bool playable = (it->mData.mIsPlayable != 0); if (!playable) // Only display playable classes diff --git a/apps/openmw/mwgui/statswindow.cpp b/apps/openmw/mwgui/statswindow.cpp index e66e01238..6c9fd0f52 100644 --- a/apps/openmw/mwgui/statswindow.cpp +++ b/apps/openmw/mwgui/statswindow.cpp @@ -494,8 +494,8 @@ namespace MWGui if (!mFactions.empty()) { - MWWorld::Ptr player = MWMechanics::getPlayer(); - const MWMechanics::NpcStats &PCstats = player.getClass().getNpcStats(player); + MWWorld::Ptr playerPtr = MWMechanics::getPlayer(); + const MWMechanics::NpcStats &PCstats = playerPtr.getClass().getNpcStats(playerPtr); const std::set &expelled = PCstats.getExpelled(); bool firstFaction=true; diff --git a/apps/openmw/mwgui/tooltips.cpp b/apps/openmw/mwgui/tooltips.cpp index 4bcf273cd..b0838b336 100644 --- a/apps/openmw/mwgui/tooltips.cpp +++ b/apps/openmw/mwgui/tooltips.cpp @@ -735,9 +735,7 @@ namespace MWGui std::vector abilities, powers, spells; - std::vector::const_iterator it = sign->mPowers.mList.begin(); - std::vector::const_iterator end = sign->mPowers.mList.end(); - for (; it != end; ++it) + for (std::vector::const_iterator it = sign->mPowers.mList.begin(); it != sign->mPowers.mList.end(); ++it) { const std::string &spellId = *it; const ESM::Spell *spell = store.get().search(spellId); diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index 4b197d273..728d3f574 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -2297,7 +2297,7 @@ void CharacterController::updateHeadTracking(float duration) node = anim->getNode("Bip01 Head"); if (node != NULL) { - osg::NodePathList nodepaths = node->getParentalNodePaths(); + nodepaths = node->getParentalNodePaths(); if (!nodepaths.empty()) direction = osg::computeLocalToWorld(nodepaths[0]).getTrans() - headPos; } diff --git a/apps/openmw/mwmechanics/repair.cpp b/apps/openmw/mwmechanics/repair.cpp index 581ba3a84..9b48f5fcb 100644 --- a/apps/openmw/mwmechanics/repair.cpp +++ b/apps/openmw/mwmechanics/repair.cpp @@ -83,7 +83,6 @@ void Repair::repair(const MWWorld::Ptr &itemToRepair) // tool used up? if (mTool.getCellRef().getCharge() == 0) { - MWWorld::Ptr player = getPlayer(); MWWorld::ContainerStore& store = player.getClass().getContainerStore(player); store.remove(mTool, 1, player); diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 328a67ecb..625ef93a9 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -2477,9 +2477,9 @@ namespace MWWorld } if (0 != source) { // Find door leading to our current teleport door - // and use it destination to position inside cell. - const DoorList &doors = source->getReadOnlyDoors().mList; - for (DoorList::const_iterator jt = doors.begin(); jt != doors.end(); ++jt) { + // and use its destination to position inside cell. + const DoorList &destinationDoors = source->getReadOnlyDoors().mList; + for (DoorList::const_iterator jt = destinationDoors.begin(); jt != destinationDoors.end(); ++jt) { if (it->mRef.getTeleport() && Misc::StringUtils::ciEqual(name, jt->mRef.getDestCell())) { @@ -3247,9 +3247,9 @@ namespace MWWorld cast.mId = id; cast.mSourceName = sourceName; cast.mStack = false; - ESM::EffectList effects; - effects.mList = apply->second; - cast.inflict(apply->first, caster, effects, rangeType, false, true); + ESM::EffectList effectsToApply; + effectsToApply.mList = apply->second; + cast.inflict(apply->first, caster, effectsToApply, rangeType, false, true); } } diff --git a/components/nifosg/nifloader.cpp b/components/nifosg/nifloader.cpp index 7823b3634..70ca82875 100644 --- a/components/nifosg/nifloader.cpp +++ b/components/nifosg/nifloader.cpp @@ -777,16 +777,16 @@ namespace NifOsg if (ctrl->recType == Nif::RC_NiAlphaController) { const Nif::NiAlphaController* alphactrl = static_cast(ctrl.getPtr()); - osg::ref_ptr ctrl(new AlphaController(alphactrl->data.getPtr())); - setupController(alphactrl, ctrl, animflags); - composite->addController(ctrl); + osg::ref_ptr osgctrl(new AlphaController(alphactrl->data.getPtr())); + setupController(alphactrl, osgctrl, animflags); + composite->addController(osgctrl); } else if (ctrl->recType == Nif::RC_NiMaterialColorController) { const Nif::NiMaterialColorController* matctrl = static_cast(ctrl.getPtr()); - osg::ref_ptr ctrl(new MaterialColorController(matctrl->data.getPtr())); - setupController(matctrl, ctrl, animflags); - composite->addController(ctrl); + osg::ref_ptr osgctrl(new MaterialColorController(matctrl->data.getPtr())); + setupController(matctrl, osgctrl, animflags); + composite->addController(osgctrl); } else std::cerr << "Unexpected material controller " << ctrl->recType << " in " << mFilename << std::endl;