diff options
author | Adam <Adam@anope.org> | 2014-04-07 15:28:07 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2014-04-07 15:28:07 -0400 |
commit | c1c45a5db9ba52111978f69eea8a6823ee467459 (patch) | |
tree | 919036e38646d02b46322a2f0d862a8e5636c77e /include/extensible.h | |
parent | a65e95837f1061b689ce8e031010f9d98406bb4d (diff) |
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.
Diffstat (limited to 'include/extensible.h')
-rw-r--r-- | include/extensible.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/extensible.h b/include/extensible.h index f33312393..2a852ff47 100644 --- a/include/extensible.h +++ b/include/extensible.h @@ -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); } }; |