mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-17 00:07:41 +02:00
- moved json-related functions (e.g. ParseBonus) into JsonUtils namespace
- replaced JsonNode::toStdVector with more universal convertTo - some renaming in StartInfo
This commit is contained in:
@ -59,7 +59,7 @@ void SettingsStorage::init()
|
||||
{
|
||||
JsonNode(ResourceID("config/settings.json")).swap(config);
|
||||
JsonNode schema(ResourceID("config/defaultSettings.json"));
|
||||
config.validate(schema);
|
||||
JsonUtils::validate(config, schema);
|
||||
}
|
||||
|
||||
void SettingsStorage::invalidateNode(const std::vector<std::string> &changedPath)
|
||||
@ -71,7 +71,7 @@ void SettingsStorage::invalidateNode(const std::vector<std::string> &changedPath
|
||||
JsonNode schema(ResourceID("config/defaultSettings.json"));
|
||||
|
||||
savedConf.Struct().erase("session");
|
||||
savedConf.minimize(schema);
|
||||
JsonUtils::minimize(savedConf, schema);
|
||||
|
||||
CResourceHandler::get()->createResource("CONFIG/settings.json");
|
||||
|
||||
|
Reference in New Issue
Block a user