Fix shadowing warnings

coverity_scan^2
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
cfg["fallback-archive"].push_back("Morrowind.bsa");
for(std::vector<std::string>::const_iterator it=archives.begin(); it!=archives.end(); ++it) {
cfg["fallback-archive"].push_back(*it);
for(std::vector<std::string>::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<std::pair<std::time_t, std::string> >::const_iterator it=contentFiles.begin(); it!=contentFiles.end(); ++it) {
cfg["content"].push_back(it->second);
for(std::vector<std::pair<std::time_t, std::string> >::const_iterator iter=contentFiles.begin(); iter!=contentFiles.end(); ++iter) {
cfg["content"].push_back(iter->second);
}
}

@ -194,8 +194,7 @@ namespace MWGui
const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
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 (; it != store.get<ESM::Class>().end(); ++it)
for (MWWorld::Store<ESM::Class>::iterator it = store.get<ESM::Class>().begin(); it != store.get<ESM::Class>().end(); ++it)
{
bool playable = (it->mData.mIsPlayable != 0);
if (!playable) // Only display playable classes

@ -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<std::string> &expelled = PCstats.getExpelled();
bool firstFaction=true;

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

@ -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;
}

@ -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);

@ -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);
}
}

@ -777,16 +777,16 @@ namespace NifOsg
if (ctrl->recType == Nif::RC_NiAlphaController)
{
const Nif::NiAlphaController* alphactrl = static_cast<const Nif::NiAlphaController*>(ctrl.getPtr());
osg::ref_ptr<AlphaController> ctrl(new AlphaController(alphactrl->data.getPtr()));
setupController(alphactrl, ctrl, animflags);
composite->addController(ctrl);
osg::ref_ptr<AlphaController> 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<const Nif::NiMaterialColorController*>(ctrl.getPtr());
osg::ref_ptr<MaterialColorController> ctrl(new MaterialColorController(matctrl->data.getPtr()));
setupController(matctrl, ctrl, animflags);
composite->addController(ctrl);
osg::ref_ptr<MaterialColorController> 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;

Loading…
Cancel
Save