diff --git a/source/core/binaryangle.cpp b/source/core/binaryangle.cpp index e50abcbec..537b206be 100644 --- a/source/core/binaryangle.cpp +++ b/source/core/binaryangle.cpp @@ -38,27 +38,15 @@ FSerializer &Serialize(FSerializer &arc, const char *key, binangle &obj, binangle *defval) { - if (arc.BeginObject(key)) - { - arc("value", obj.value).EndObject(); - } - return arc; + return Serialize(arc, key, obj.value, defval ? &defval->value : nullptr); } FSerializer &Serialize(FSerializer &arc, const char *key, lookangle &obj, lookangle *defval) { - if (arc.BeginObject(key)) - { - arc("value", obj.value).EndObject(); - } - return arc; + return Serialize(arc, key, obj.value, defval ? &defval->value : nullptr); } FSerializer &Serialize(FSerializer &arc, const char *key, fixedhoriz &obj, fixedhoriz *defval) { - if (arc.BeginObject(key)) - { - arc("value", obj.value).EndObject(); - } - return arc; + return Serialize(arc, key, obj.value, defval ? &defval->value : nullptr); }