summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--slicer/slicer/modelParts.h1
-rw-r--r--slicer/slicer/modelPartsTypes.h2
-rw-r--r--slicer/slicer/modelPartsTypes.impl.h4
3 files changed, 4 insertions, 3 deletions
diff --git a/slicer/slicer/modelParts.h b/slicer/slicer/modelParts.h
index 39149fd..f521257 100644
--- a/slicer/slicer/modelParts.h
+++ b/slicer/slicer/modelParts.h
@@ -79,6 +79,7 @@ namespace Slicer {
class HookCommon;
using ModelPartPtr = std::shared_ptr<ModelPart>;
+ using ModelPartUPtr = std::unique_ptr<ModelPart>;
using ModelPartForRootPtr = std::unique_ptr<ModelPartForRootBase>;
using ModelPartParam = any_ptr<ModelPart>;
using ModelPartForRootParam = any_ptr<ModelPartForRootBase>;
diff --git a/slicer/slicer/modelPartsTypes.h b/slicer/slicer/modelPartsTypes.h
index ab262f3..838bbd0 100644
--- a/slicer/slicer/modelPartsTypes.h
+++ b/slicer/slicer/modelPartsTypes.h
@@ -113,7 +113,7 @@ namespace Slicer {
protected:
virtual bool hasModel() const = 0;
- ModelPartPtr modelPart;
+ ModelPartUPtr modelPart;
};
template<typename T>
diff --git a/slicer/slicer/modelPartsTypes.impl.h b/slicer/slicer/modelPartsTypes.impl.h
index 7884a02..3a4076e 100644
--- a/slicer/slicer/modelPartsTypes.impl.h
+++ b/slicer/slicer/modelPartsTypes.impl.h
@@ -300,7 +300,7 @@ namespace Slicer {
ModelPartModel<Ice::optional<typename T::element_type>>(h)
{
if (this->Model && *this->Model) {
- modelPart = std::make_shared<T>(&**this->Model);
+ modelPart = std::make_unique<T>(&**this->Model);
}
}
@@ -319,7 +319,7 @@ namespace Slicer {
BOOST_ASSERT(this->Model);
if (!*this->Model) {
*this->Model = typename T::element_type();
- modelPart = std::make_shared<T>(&**this->Model);
+ modelPart = std::make_unique<T>(&**this->Model);
modelPart->Create();
}
}