From d485e880cba753d9783309be1dbb9da57d6ce634 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 20 Aug 2023 01:46:36 +0100 Subject: Create dictionary container/children ModelParts on the stack No longer uses make_shared. --- slicer/slicer/modelPartsTypes.impl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/slicer/slicer/modelPartsTypes.impl.h b/slicer/slicer/modelPartsTypes.impl.h index 9cdbe47..7884a02 100644 --- a/slicer/slicer/modelPartsTypes.impl.h +++ b/slicer/slicer/modelPartsTypes.impl.h @@ -664,7 +664,7 @@ namespace Slicer { ModelPartForDictionary::OnAnonChild(const SubPartHandler & ch, const HookFilter &) { BOOST_ASSERT(this->Model); - ch(std::make_shared>(this->Model), emptyMetadata); + ch(ModelPartForDictionaryElementInserter(this->Model), emptyMetadata); return true; } @@ -677,7 +677,7 @@ namespace Slicer { if (!optionalCaseEq(name, pairName, matchCase)) { throw IncorrectElementName(std::string {name}); } - ch(std::make_shared>(this->Model), emptyMetadata); + ch(ModelPartForDictionaryElementInserter(this->Model), emptyMetadata); return true; } @@ -692,7 +692,7 @@ namespace Slicer { void ModelPartForDictionary::OnContained(const ModelPartHandler & h) { - return h(std::make_shared>(nullptr)); + return h(ModelPartForStruct(nullptr)); } // ModelPartForStream -- cgit v1.2.3