- do not wrap the simple value wrappers into a JSON object when being serialized.

It only adds to the processing time - they can just be written out as-is.
This commit is contained in:
Christoph Oelckers 2020-10-10 21:36:12 +02:00
parent 271eb1c3fa
commit dcde91b0c9

View file

@ -38,27 +38,15 @@
FSerializer &Serialize(FSerializer &arc, const char *key, binangle &obj, binangle *defval) FSerializer &Serialize(FSerializer &arc, const char *key, binangle &obj, binangle *defval)
{ {
if (arc.BeginObject(key)) return Serialize(arc, key, obj.value, defval ? &defval->value : nullptr);
{
arc("value", obj.value).EndObject();
}
return arc;
} }
FSerializer &Serialize(FSerializer &arc, const char *key, lookangle &obj, lookangle *defval) FSerializer &Serialize(FSerializer &arc, const char *key, lookangle &obj, lookangle *defval)
{ {
if (arc.BeginObject(key)) return Serialize(arc, key, obj.value, defval ? &defval->value : nullptr);
{
arc("value", obj.value).EndObject();
}
return arc;
} }
FSerializer &Serialize(FSerializer &arc, const char *key, fixedhoriz &obj, fixedhoriz *defval) FSerializer &Serialize(FSerializer &arc, const char *key, fixedhoriz &obj, fixedhoriz *defval)
{ {
if (arc.BeginObject(key)) return Serialize(arc, key, obj.value, defval ? &defval->value : nullptr);
{
arc("value", obj.value).EndObject();
}
return arc;
} }