1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

fixed formatting and other small issues

This commit is contained in:
Henning Koehler 2017-09-17 15:48:01 +12:00
parent 73f782aa39
commit f9a8cb2876
4 changed files with 11 additions and 11 deletions

View File

@ -492,9 +492,9 @@ std::vector<std::shared_ptr<Bonus>> SpecialtyInfoToBonuses(const SSpecialtyInfo
//propagate for regular upgrades of base creature
for(auto cre_id : creatures[spec.subtype]->upgrades)
{
bonus = std::make_shared<Bonus>(*bonus);
bonus->subtype = cre_id;
result.push_back(bonus);
std::shared_ptr<Bonus> upgradeUpgradedVersion = std::make_shared<Bonus>(*bonus);
upgradeUpgradedVersion->subtype = cre_id;
result.push_back(upgradeUpgradedVersion);
}
}
break;
@ -613,10 +613,10 @@ void CHeroHandler::loadHeroSpecialty(CHero * hero, const JsonNode & node)
for(const JsonNode &specialty : specialtiesNode.Vector())
{
SSpecialtyInfo spec;
spec.type = specialty["type"].Float();
spec.val = specialty["val"].Float();
spec.subtype = specialty["subtype"].Float();
spec.additionalinfo = specialty["info"].Float();
spec.type = specialty["type"].Integer();
spec.val = specialty["val"].Integer();
spec.subtype = specialty["subtype"].Integer();
spec.additionalinfo = specialty["info"].Integer();
//we convert after loading completes, to have all identifiers for json logging
hero->specDeprecated.push_back(spec);
}

View File

@ -1034,7 +1034,7 @@ public:
virtual std::string toString() const;
virtual JsonNode toJsonNode() const = 0;
template <typename Handler> void serialize(Handler &h, const int version)
template <typename Handler> void serialize(Handler & h, const int version)
{
}
};
@ -1048,7 +1048,7 @@ public:
ScalingUpdater();
ScalingUpdater(int valPer20, int stepSize = 1);
template <typename Handler> void serialize(Handler &h, const int version)
template <typename Handler> void serialize(Handler & h, const int version)
{
h & static_cast<IUpdater &>(*this);
h & valPer20;

View File

@ -648,7 +648,7 @@ bool JsonUtils::parseBonus(const JsonNode &ability, Bonus *b)
b->propagator = parseByMap(bonusPropagatorMap, value, "propagator type ");
value = &ability["updater"];
if (!value->isNull())
if(!value->isNull())
{
const JsonNode & updaterJson = *value;
if(updaterJson["type"].String() == "GROWS_WITH_LEVEL")

View File

@ -540,7 +540,7 @@ void CGHeroInstance::recreateSecondarySkillsBonuses()
updateSkill(SecondarySkill(skill_info.first), level);
}
void CGHeroInstance::recreateSpecialtyBonuses(std::vector<HeroSpecial*> & specialtyDeprecated)
void CGHeroInstance::recreateSpecialtyBonuses(std::vector<HeroSpecial *> & specialtyDeprecated)
{
auto HeroSpecialToSpecialtyBonus = [](HeroSpecial & hs) -> SSpecialtyBonus
{