Skip to content

Commit

Permalink
Fix OXC variable shadowing
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/Geoscape/GeoscapeState.cpp
  • Loading branch information
MeridianOXC authored and SupSuper committed Dec 31, 2019
1 parent 3ad3783 commit 59b1333
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Geoscape/GeoscapeState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1512,13 +1512,13 @@ class GenerateSupplyMission: public std::unary_function<const AlienBase *, void>
*/
void GenerateSupplyMission::operator()(const AlienBase *base) const
{
std::string mission = base->getDeployment()->chooseGenMissionType();
if (_mod.getAlienMission(mission))
std::string missionName = base->getDeployment()->chooseGenMissionType();
if (_mod.getAlienMission(missionName))
{
if (RNG::percent(base->getDeployment()->getGenMissionFrequency()))
{
//Spawn supply mission for this base.
const RuleAlienMission &rule = *_mod.getAlienMission(mission);
const RuleAlienMission &rule = *_mod.getAlienMission(missionName);
AlienMission *mission = new AlienMission(rule);
mission->setRegion(_save.locateRegion(*base)->getRules()->getType(), _mod);
mission->setId(_save.getId("ALIEN_MISSIONS"));
Expand All @@ -1528,9 +1528,9 @@ void GenerateSupplyMission::operator()(const AlienBase *base) const
_save.getAlienMissions().push_back(mission);
}
}
else if (!mission.empty())
else if (!missionName.empty())
{
throw Exception("Alien Base tried to generate undefined mission: " + mission);
throw Exception("Alien Base tried to generate undefined mission: " + missionName);
}
}

Expand Down

0 comments on commit 59b1333

Please sign in to comment.