summaryrefslogtreecommitdiff
path: root/src/base.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/base.cpp')
-rw-r--r--src/base.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/base.cpp b/src/base.cpp
index b007a1098..496b23ef5 100644
--- a/src/base.cpp
+++ b/src/base.cpp
@@ -243,6 +243,12 @@ std::string LocalStringExt::serialize(SerializeFormat format, const Extensible*
return "";
}
+void LocalStringExt::unserialize(SerializeFormat format, Extensible* container, const std::string& value)
+{
+ if (format != FORMAT_NETWORK)
+ set(container, value);
+}
+
LocalIntExt::LocalIntExt(const std::string& Key, ExtensibleType exttype, Module* mod)
: LocalExtItem(Key, exttype, mod)
{
@@ -259,6 +265,12 @@ std::string LocalIntExt::serialize(SerializeFormat format, const Extensible* con
return ConvToStr(reinterpret_cast<intptr_t>(item));
}
+void LocalIntExt::unserialize(SerializeFormat format, Extensible* container, const std::string& value)
+{
+ if (format != FORMAT_NETWORK)
+ set(container, ConvToInt(value));
+}
+
intptr_t LocalIntExt::get(const Extensible* container) const
{
return reinterpret_cast<intptr_t>(get_raw(container));