1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

formatting fix and code simplification in HeroBonus

This commit is contained in:
Henning Koehler 2018-02-20 23:36:00 +13:00
parent e76efff0c3
commit 89cb7b2780
2 changed files with 3 additions and 3 deletions

View File

@ -1759,9 +1759,7 @@ const std::shared_ptr<Bonus> GrowsWithLevelUpdater::update(const std::shared_ptr
std::string GrowsWithLevelUpdater::toString() const
{
char buf[100];
sprintf(buf, "GrowsWithLevelUpdater(valPer20=%d, stepSize=%d)", valPer20, stepSize);
return std::string(buf);
return boost::str(boost::format("GrowsWithLevelUpdater(valPer20=%d, stepSize=%d)") % valPer20 % stepSize);
}
JsonNode GrowsWithLevelUpdater::toJsonNode() const

View File

@ -367,7 +367,9 @@ struct DLL_LINKAGE Bonus : public std::enable_shared_from_this<Bonus>
h & limiter;
h & propagator;
if(version >= 781)
{
h & updater;
}
}
template <typename Ptr>