mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Remove std::vector<boo> from Json Serializer, simplify affected code
This commit is contained in:
@@ -95,7 +95,7 @@ void JsonSerializer::serializeInternal(int64_t & value)
|
||||
currentObject->Integer() = value;
|
||||
}
|
||||
|
||||
void JsonSerializer::serializeLIC(const std::string & fieldName, const TDecoder & decoder, const TEncoder & encoder, const std::vector<bool> & standard, std::vector<bool> & value)
|
||||
void JsonSerializer::serializeLIC(const std::string & fieldName, const TDecoder & decoder, const TEncoder & encoder, const std::set<int32_t> & standard, std::set<int32_t> & value)
|
||||
{
|
||||
assert(standard.size() == value.size());
|
||||
if(standard == value)
|
||||
@@ -104,15 +104,6 @@ void JsonSerializer::serializeLIC(const std::string & fieldName, const TDecoder
|
||||
writeLICPart(fieldName, "anyOf", encoder, value);
|
||||
}
|
||||
|
||||
void JsonSerializer::serializeLIC(const std::string & fieldName, LIC & value)
|
||||
{
|
||||
if(value.any != value.standard)
|
||||
writeLICPart(fieldName, "anyOf", value.encoder, value.any);
|
||||
|
||||
writeLICPart(fieldName, "allOf", value.encoder, value.all);
|
||||
writeLICPart(fieldName, "noneOf", value.encoder, value.none);
|
||||
}
|
||||
|
||||
void JsonSerializer::serializeLIC(const std::string & fieldName, LICSet & value)
|
||||
{
|
||||
if(value.any != value.standard)
|
||||
|
||||
Reference in New Issue
Block a user