summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-08-06 14:39:05 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2023-08-06 16:50:10 +0100
commitf1ea89056938253289751c422c2b82977ee44aa3 (patch)
tree9b3fc4358eff05171cdb90f1a2284efa256a535d
parentAdd missing DLL_PUBLIC to IceBase destructor (diff)
downloadslicer-f1ea89056938253289751c422c2b82977ee44aa3.tar.bz2
slicer-f1ea89056938253289751c422c2b82977ee44aa3.tar.xz
slicer-f1ea89056938253289751c422c2b82977ee44aa3.zip
Make [de]serializers on stack
-rw-r--r--slicer/slicer/slicer.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/slicer/slicer/slicer.h b/slicer/slicer/slicer.h
index 5450722..66e4537 100644
--- a/slicer/slicer/slicer.h
+++ b/slicer/slicer/slicer.h
@@ -19,7 +19,7 @@ namespace Slicer {
Object
DeserializeAny(SerializerParams &&... sp)
{
- return DeserializeAnyWith<Object>(std::make_unique<Deserializer>(std::forward<SerializerParams>(sp)...));
+ return DeserializeAnyWith<Object>(Deserializer(std::forward<SerializerParams>(sp)...));
}
template<typename Object>
@@ -33,7 +33,7 @@ namespace Slicer {
void
SerializeAny(const Object & object, SerializerParams &&... sp)
{
- SerializeAnyWith(object, std::make_unique<Serializer>(std::forward<SerializerParams>(sp)...));
+ SerializeAnyWith(object, Serializer(std::forward<SerializerParams>(sp)...));
}
}