From 2ead069b2e0bdaa6c11a0d4a3158cc12e01bcd26 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 12 Aug 2023 00:00:30 +0100 Subject: Simply Sequence get anon child with emplace --- slicer/slicer/modelPartsTypes.impl.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/slicer/slicer/modelPartsTypes.impl.h b/slicer/slicer/modelPartsTypes.impl.h index 5f5acf5..0924de6 100644 --- a/slicer/slicer/modelPartsTypes.impl.h +++ b/slicer/slicer/modelPartsTypes.impl.h @@ -607,8 +607,7 @@ namespace Slicer { ModelPartForSequence::GetAnonChildRef(const HookFilter &) { BOOST_ASSERT(this->Model); - this->Model->push_back(typename element_type::value_type()); - return ChildRef(ModelPart::CreateFor(this->Model->back())); + return ChildRef(ModelPart::CreateFor(this->Model->emplace_back())); } template -- cgit v1.2.3