From dcde91b0c95a2f8e67c1b7fa877161862c3dfec0 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 10 Oct 2020 21:36:12 +0200 Subject: [PATCH] - 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. --- source/core/binaryangle.cpp | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) 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); }