mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
code review
This commit is contained in:
@@ -119,6 +119,16 @@ void JsonDeserializer::serializeInternal(const std::string & fieldName, std::vec
|
||||
}
|
||||
}
|
||||
|
||||
void JsonDeserializer::serializeInternal(const std::string & fieldName, std::map<std::string, uint16_t> & value)
|
||||
{
|
||||
const JsonMap & data = currentObject->operator[](fieldName).Struct();
|
||||
|
||||
value.clear();
|
||||
|
||||
for(const auto & [id, elem] : data)
|
||||
value[id] = elem.Integer();
|
||||
}
|
||||
|
||||
void JsonDeserializer::serializeInternal(std::string & value)
|
||||
{
|
||||
value = currentObject->String();
|
||||
|
||||
Reference in New Issue
Block a user