1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

vcmi: modernize rest of lib

This commit is contained in:
Konstantin
2023-03-14 00:26:44 +03:00
parent 17520b70ce
commit 4c4498b22a
70 changed files with 1278 additions and 1463 deletions

View File

@@ -209,7 +209,7 @@ void CBonusTypeHandler::load()
void CBonusTypeHandler::load(const JsonNode & config)
{
for(auto & node : config.Struct())
for(const auto & node : config.Struct())
{
auto it = bonusNameMap.find(node.first);
@@ -235,7 +235,7 @@ void CBonusTypeHandler::load(const JsonNode & config)
}
}
void CBonusTypeHandler::loadItem(const JsonNode & source, CBonusType & dest, const std::string & name)
void CBonusTypeHandler::loadItem(const JsonNode & source, CBonusType & dest, const std::string & name) const
{
dest.identifier = name;
dest.hidden = source["hidden"].Bool(); //Null -> false