From c1c45a5db9ba52111978f69eea8a6823ee467459 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 7 Apr 2014 15:28:07 -0400 Subject: 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. --- include/extensible.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') 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; if (data[this->name] >> t) this->Set(e, t); + else + this->Unset(e); } }; @@ -196,6 +198,8 @@ class SerializableExtensibleItem : public PrimitiveExtensibleItem data[this->name] >> b; if (b) this->Set(e); + else + this->Unset(e); } }; -- cgit