From 1aa38a090e9de24c8a5ea8e12c6601d66fa6e2d7 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 6 Aug 2023 12:12:00 +0100 Subject: [De]serializeAny[With] uses unique_ptr --- slicer/slicer/slicer.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/slicer/slicer/slicer.h b/slicer/slicer/slicer.h index ce7e037..5450722 100644 --- a/slicer/slicer/slicer.h +++ b/slicer/slicer/slicer.h @@ -8,7 +8,7 @@ namespace Slicer { template Object - DeserializeAnyWith(const DeserializerPtr & deserializer) + DeserializeAnyWith(any_ptr deserializer) { Object object {}; deserializer->Deserialize(ModelPart::CreateRootFor(object)); @@ -19,12 +19,12 @@ namespace Slicer { Object DeserializeAny(SerializerParams &&... sp) { - return DeserializeAnyWith(std::make_shared(std::forward(sp)...)); + return DeserializeAnyWith(std::make_unique(std::forward(sp)...)); } template void - SerializeAnyWith(const Object & object, const SerializerPtr & serializer) + SerializeAnyWith(const Object & object, any_ptr serializer) { serializer->Serialize(ModelPart::CreateRootFor(object)); } @@ -33,7 +33,7 @@ namespace Slicer { void SerializeAny(const Object & object, SerializerParams &&... sp) { - SerializeAnyWith(object, std::make_shared(std::forward(sp)...)); + SerializeAnyWith(object, std::make_unique(std::forward(sp)...)); } } -- cgit v1.2.3