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:
parent
e76efff0c3
commit
89cb7b2780
@ -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
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user