Skip to content
Snippets Groups Projects
Commit 79c817a2 authored by Julien Malik's avatar Julien Malik
Browse files

ENH: use WeakPointer instead of raw pointer to underline the smart pointer loop pb

parent 7db51c73
Branches
Tags
No related merge requests found
...@@ -167,13 +167,13 @@ public: ...@@ -167,13 +167,13 @@ public:
virtual const Parameter::Pointer GetRoot() virtual const Parameter::Pointer GetRoot()
{ {
return m_Root; return m_Root.GetPointer();
} }
/** Is the paramter a root or a child of another param */ /** Is the paramter a root or a child of another param */
virtual bool IsRoot() virtual bool IsRoot()
{ {
return (this == m_Root); return (this == m_Root.GetPointer());
} }
/** Add a child of this parameter when the param is a Group or a /** Add a child of this parameter when the param is a Group or a
...@@ -256,7 +256,7 @@ protected: ...@@ -256,7 +256,7 @@ protected:
Role m_Role; Role m_Role;
/** List of parents Parameters */ /** List of parents Parameters */
Parameter* m_Root; itk::WeakPointer<Parameter> m_Root;
/** List of children parameters */ /** List of children parameters */
std::vector<Parameter::Pointer > m_ChildrenList; std::vector<Parameter::Pointer > m_ChildrenList;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment