summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-08-20 01:46:36 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2023-08-20 01:46:39 +0100
commitd485e880cba753d9783309be1dbb9da57d6ce634 (patch)
treee47e03bba8d0a77fc274e8f30d0621563bd81fea
parentLogical inversion (diff)
downloadslicer-d485e880cba753d9783309be1dbb9da57d6ce634.tar.bz2
slicer-d485e880cba753d9783309be1dbb9da57d6ce634.tar.xz
slicer-d485e880cba753d9783309be1dbb9da57d6ce634.zip
Create dictionary container/children ModelParts on the stack
No longer uses make_shared.
-rw-r--r--slicer/slicer/modelPartsTypes.impl.h6
1 files 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<T>::OnAnonChild(const SubPartHandler & ch, const HookFilter &)
{
BOOST_ASSERT(this->Model);
- ch(std::make_shared<ModelPartForDictionaryElementInserter<T>>(this->Model), emptyMetadata);
+ ch(ModelPartForDictionaryElementInserter<T>(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<ModelPartForDictionaryElementInserter<T>>(this->Model), emptyMetadata);
+ ch(ModelPartForDictionaryElementInserter<T>(this->Model), emptyMetadata);
return true;
}
@@ -692,7 +692,7 @@ namespace Slicer {
void
ModelPartForDictionary<T>::OnContained(const ModelPartHandler & h)
{
- return h(std::make_shared<ModelPartForStruct<typename T::value_type>>(nullptr));
+ return h(ModelPartForStruct<typename T::value_type>(nullptr));
}
// ModelPartForStream