- a few more minor code quality fixes
This commit is contained in:
parent
da3c55c00b
commit
2d3e04f413
|
@ -208,8 +208,8 @@ string AttackBoost::getDesc(bool translatedValue) const{
|
||||||
void AttackBoost::loadGame(const XmlNode *rootNode, Faction *faction, const SkillType *skillType) {
|
void AttackBoost::loadGame(const XmlNode *rootNode, Faction *faction, const SkillType *skillType) {
|
||||||
const XmlNode *attackBoostNode = rootNode->getChild("AttackBoost");
|
const XmlNode *attackBoostNode = rootNode->getChild("AttackBoost");
|
||||||
|
|
||||||
enabled = attackBoostNode->getAttribute("enabled")->getIntValue();
|
enabled = (attackBoostNode->getAttribute("enabled")->getIntValue() != 0);
|
||||||
allowMultipleBoosts = attackBoostNode->getAttribute("allowMultipleBoosts")->getIntValue();
|
allowMultipleBoosts = (attackBoostNode->getAttribute("allowMultipleBoosts")->getIntValue() != 0);
|
||||||
radius = attackBoostNode->getAttribute("radius")->getIntValue();
|
radius = attackBoostNode->getAttribute("radius")->getIntValue();
|
||||||
targetType = static_cast<AttackBoostTargetType>(attackBoostNode->getAttribute("targetType")->getIntValue());
|
targetType = static_cast<AttackBoostTargetType>(attackBoostNode->getAttribute("targetType")->getIntValue());
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@ void AttackBoost::loadGame(const XmlNode *rootNode, Faction *faction, const Skil
|
||||||
unitParticleSystemTypeForAffectedUnit = new UnitParticleSystemType();
|
unitParticleSystemTypeForAffectedUnit = new UnitParticleSystemType();
|
||||||
unitParticleSystemTypeForAffectedUnit->loadGame(attackBoostNode);
|
unitParticleSystemTypeForAffectedUnit->loadGame(attackBoostNode);
|
||||||
|
|
||||||
includeSelf = attackBoostNode->getAttribute("includeSelf")->getIntValue();
|
includeSelf = (attackBoostNode->getAttribute("includeSelf")->getIntValue() != 0);
|
||||||
name = attackBoostNode->getAttribute("name")->getValue();
|
name = attackBoostNode->getAttribute("name")->getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -501,9 +501,6 @@ Checksum Map::load(const string &path, TechTree *techTree, Tileset *tileset) {
|
||||||
if(f) fclose(f);
|
if(f) fclose(f);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(f) fclose(f);
|
|
||||||
f = NULL;
|
|
||||||
|
|
||||||
throw megaglest_runtime_error("Can't open file");
|
throw megaglest_runtime_error("Can't open file");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user