1
0
mirror of https://github.com/anope/anope.git synced 2026-06-25 23:06:38 +02:00

Do not clear all extension items tied to objects when unserializing.

Instead, pass the old object to the unserialization functions and let
them incrementally update the object.
This commit is contained in:
Adam
2014-04-07 15:28:07 -04:00
parent a65e95837f
commit c1c45a5db9
2 changed files with 4 additions and 3 deletions
+4
View File
@@ -176,6 +176,8 @@ class SerializableExtensibleItem : public PrimitiveExtensibleItem<T>
T t;
if (data[this->name] >> t)
this->Set(e, t);
else
this->Unset(e);
}
};
@@ -196,6 +198,8 @@ class SerializableExtensibleItem<bool> : public PrimitiveExtensibleItem<bool>
data[this->name] >> b;
if (b)
this->Set(e);
else
this->Unset(e);
}
};