diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-08-12 00:00:30 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-08-12 00:00:30 +0100 |
commit | 2ead069b2e0bdaa6c11a0d4a3158cc12e01bcd26 (patch) | |
tree | 9d9d987bc3902bfeb51185d81f22291caf0dbd95 | |
parent | Fix to_lower so actually lowers the string (diff) | |
download | slicer-2ead069b2e0bdaa6c11a0d4a3158cc12e01bcd26.tar.bz2 slicer-2ead069b2e0bdaa6c11a0d4a3158cc12e01bcd26.tar.xz slicer-2ead069b2e0bdaa6c11a0d4a3158cc12e01bcd26.zip |
Simply Sequence get anon child with emplace
-rw-r--r-- | slicer/slicer/modelPartsTypes.impl.h | 3 |
1 files changed, 1 insertions, 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<T>::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<typename T> |