Skip to content

Commit

Permalink
[Core] Missing call to super init (#4634)
Browse files Browse the repository at this point in the history
  • Loading branch information
alxbilger committed Apr 16, 2024
1 parent d5b6f76 commit 3ea83cb
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Sofa/framework/Core/src/sofa/core/Mapping.inl
Expand Up @@ -98,6 +98,8 @@ type::vector<behavior::BaseMechanicalState*> Mapping<In,Out>::getMechTo()
template <class In, class Out>
void Mapping<In,Out>::init()
{
Inherit1::init();

if(toModel && !testMechanicalState(toModel.get()))
{
setNonMechanical();
Expand Down
Expand Up @@ -39,6 +39,8 @@ BaseAnimationLoop::~BaseAnimationLoop()

void BaseAnimationLoop::init()
{
Inherit1::init();

if(!l_node)
l_node = dynamic_cast<sofa::core::objectmodel::BaseNode*>(getContext());
}
Expand Down
Expand Up @@ -31,6 +31,8 @@ namespace sofa::core::behavior
template< class DataTypes >
void ConstraintCorrection< DataTypes >::init()
{
Inherit1::init();

mstate = dynamic_cast< behavior::MechanicalState< DataTypes >* >(getContext()->getMechanicalState());
}

Expand Down Expand Up @@ -186,4 +188,4 @@ void ConstraintCorrection< DataTypes >::addConstraintForceInMotionSpace(const co
f.endEdit();
}

} // namespace sofa::core::behavior
} // namespace sofa::core::behavior
1 change: 0 additions & 1 deletion Sofa/framework/Core/src/sofa/core/loader/SceneLoader.h
Expand Up @@ -42,7 +42,6 @@ class SOFA_CORE_API SceneLoader : public virtual BaseLoader
public:
bool canLoad() override;

//virtual void init();
void parse ( sofa::core::objectmodel::BaseObjectDescription* arg ) override;

void reinit() override;
Expand Down
Expand Up @@ -41,6 +41,8 @@ ConfigurationSetting::~ConfigurationSetting()

void ConfigurationSetting::init()
{
Inherit1::init();

//Set all the Data in read only mode:
for (VecData::const_iterator it = m_vecData.begin(); it!=m_vecData.end(); ++it)
{
Expand Down

0 comments on commit 3ea83cb

Please sign in to comment.