mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 17:01:28 +00:00
- 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:
parent
271eb1c3fa
commit
dcde91b0c9
1 changed files with 3 additions and 15 deletions
|
@ -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;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue