Fix shadowing warnings

pull/74/head
Allofich 8 years ago
parent 140be70a90
commit 6ec37b5cfb

@ -824,8 +824,8 @@ void MwIniImporter::importArchives(multistrmap &cfg, const multistrmap &ini) con
// does not appears in the ini file // does not appears in the ini file
cfg["fallback-archive"].push_back("Morrowind.bsa"); cfg["fallback-archive"].push_back("Morrowind.bsa");
for(std::vector<std::string>::const_iterator it=archives.begin(); it!=archives.end(); ++it) { for(std::vector<std::string>::const_iterator iter=archives.begin(); iter!=archives.end(); ++iter) {
cfg["fallback-archive"].push_back(*it); 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. // this will sort files by time order first, then alphabetical (maybe), I suspect non ASCII filenames will be stuffed.
sort(contentFiles.begin(), contentFiles.end()); sort(contentFiles.begin(), contentFiles.end());
for(std::vector<std::pair<std::time_t, std::string> >::const_iterator it=contentFiles.begin(); it!=contentFiles.end(); ++it) { for(std::vector<std::pair<std::time_t, std::string> >::const_iterator iter=contentFiles.begin(); iter!=contentFiles.end(); ++iter) {
cfg["content"].push_back(it->second); cfg["content"].push_back(iter->second);
} }
} }

@ -193,9 +193,8 @@ namespace MWGui
const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore(); const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
std::vector<std::pair<std::string, std::string> > items; // class id, class name std::vector<std::pair<std::string, std::string> > items; // class id, class name
MWWorld::Store<ESM::Class>::iterator it = store.get<ESM::Class>().begin(); for (MWWorld::Store<ESM::Class>::iterator it = store.get<ESM::Class>().begin(); it != store.get<ESM::Class>().end(); ++it)
for (; it != store.get<ESM::Class>().end(); ++it)
{ {
bool playable = (it->mData.mIsPlayable != 0); bool playable = (it->mData.mIsPlayable != 0);
if (!playable) // Only display playable classes if (!playable) // Only display playable classes

@ -494,8 +494,8 @@ namespace MWGui
if (!mFactions.empty()) if (!mFactions.empty())
{ {
MWWorld::Ptr player = MWMechanics::getPlayer(); MWWorld::Ptr playerPtr = MWMechanics::getPlayer();
const MWMechanics::NpcStats &PCstats = player.getClass().getNpcStats(player); const MWMechanics::NpcStats &PCstats = playerPtr.getClass().getNpcStats(playerPtr);
const std::set<std::string> &expelled = PCstats.getExpelled(); const std::set<std::string> &expelled = PCstats.getExpelled();
bool firstFaction=true; bool firstFaction=true;

@ -735,9 +735,7 @@ namespace MWGui
std::vector<std::string> abilities, powers, spells; std::vector<std::string> abilities, powers, spells;
std::vector<std::string>::const_iterator it = sign->mPowers.mList.begin(); for (std::vector<std::string>::const_iterator it = sign->mPowers.mList.begin(); it != sign->mPowers.mList.end(); ++it)
std::vector<std::string>::const_iterator end = sign->mPowers.mList.end();
for (; it != end; ++it)
{ {
const std::string &spellId = *it; const std::string &spellId = *it;
const ESM::Spell *spell = store.get<ESM::Spell>().search(spellId); const ESM::Spell *spell = store.get<ESM::Spell>().search(spellId);

@ -2297,7 +2297,7 @@ void CharacterController::updateHeadTracking(float duration)
node = anim->getNode("Bip01 Head"); node = anim->getNode("Bip01 Head");
if (node != NULL) if (node != NULL)
{ {
osg::NodePathList nodepaths = node->getParentalNodePaths(); nodepaths = node->getParentalNodePaths();
if (!nodepaths.empty()) if (!nodepaths.empty())
direction = osg::computeLocalToWorld(nodepaths[0]).getTrans() - headPos; direction = osg::computeLocalToWorld(nodepaths[0]).getTrans() - headPos;
} }

@ -83,7 +83,6 @@ void Repair::repair(const MWWorld::Ptr &itemToRepair)
// tool used up? // tool used up?
if (mTool.getCellRef().getCharge() == 0) if (mTool.getCellRef().getCharge() == 0)
{ {
MWWorld::Ptr player = getPlayer();
MWWorld::ContainerStore& store = player.getClass().getContainerStore(player); MWWorld::ContainerStore& store = player.getClass().getContainerStore(player);
store.remove(mTool, 1, player); store.remove(mTool, 1, player);

@ -2477,9 +2477,9 @@ namespace MWWorld
} }
if (0 != source) { if (0 != source) {
// Find door leading to our current teleport door // Find door leading to our current teleport door
// and use it destination to position inside cell. // and use its destination to position inside cell.
const DoorList &doors = source->getReadOnlyDoors().mList; const DoorList &destinationDoors = source->getReadOnlyDoors().mList;
for (DoorList::const_iterator jt = doors.begin(); jt != doors.end(); ++jt) { for (DoorList::const_iterator jt = destinationDoors.begin(); jt != destinationDoors.end(); ++jt) {
if (it->mRef.getTeleport() && if (it->mRef.getTeleport() &&
Misc::StringUtils::ciEqual(name, jt->mRef.getDestCell())) Misc::StringUtils::ciEqual(name, jt->mRef.getDestCell()))
{ {
@ -3247,9 +3247,9 @@ namespace MWWorld
cast.mId = id; cast.mId = id;
cast.mSourceName = sourceName; cast.mSourceName = sourceName;
cast.mStack = false; cast.mStack = false;
ESM::EffectList effects; ESM::EffectList effectsToApply;
effects.mList = apply->second; effectsToApply.mList = apply->second;
cast.inflict(apply->first, caster, effects, rangeType, false, true); cast.inflict(apply->first, caster, effectsToApply, rangeType, false, true);
} }
} }

@ -777,16 +777,16 @@ namespace NifOsg
if (ctrl->recType == Nif::RC_NiAlphaController) if (ctrl->recType == Nif::RC_NiAlphaController)
{ {
const Nif::NiAlphaController* alphactrl = static_cast<const Nif::NiAlphaController*>(ctrl.getPtr()); const Nif::NiAlphaController* alphactrl = static_cast<const Nif::NiAlphaController*>(ctrl.getPtr());
osg::ref_ptr<AlphaController> ctrl(new AlphaController(alphactrl->data.getPtr())); osg::ref_ptr<AlphaController> osgctrl(new AlphaController(alphactrl->data.getPtr()));
setupController(alphactrl, ctrl, animflags); setupController(alphactrl, osgctrl, animflags);
composite->addController(ctrl); composite->addController(osgctrl);
} }
else if (ctrl->recType == Nif::RC_NiMaterialColorController) else if (ctrl->recType == Nif::RC_NiMaterialColorController)
{ {
const Nif::NiMaterialColorController* matctrl = static_cast<const Nif::NiMaterialColorController*>(ctrl.getPtr()); const Nif::NiMaterialColorController* matctrl = static_cast<const Nif::NiMaterialColorController*>(ctrl.getPtr());
osg::ref_ptr<MaterialColorController> ctrl(new MaterialColorController(matctrl->data.getPtr())); osg::ref_ptr<MaterialColorController> osgctrl(new MaterialColorController(matctrl->data.getPtr()));
setupController(matctrl, ctrl, animflags); setupController(matctrl, osgctrl, animflags);
composite->addController(ctrl); composite->addController(osgctrl);
} }
else else
std::cerr << "Unexpected material controller " << ctrl->recType << " in " << mFilename << std::endl; std::cerr << "Unexpected material controller " << ctrl->recType << " in " << mFilename << std::endl;

Loading…
Cancel
Save