Skip to content

Commit

Permalink
[SofaBaseMechanics] Use directly clear() when resetting force in Mech…
Browse files Browse the repository at this point in the history
…anicalObject (#2518)

instead of assign operator + defaultconstructor (which in fine do the same clear() function)
  • Loading branch information
fredroy authored Dec 7, 2021
1 parent df2ce63 commit d651d9c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2515,7 +2515,7 @@ void MechanicalObject<DataTypes>::resetForce(const core::ExecParams* params, cor
{
helper::WriteOnlyAccessor< Data<VecDeriv> > f( *this->write(fid) );
for (unsigned i = 0; i < f.size(); ++i)
f[i] = Deriv();
f[i].clear();
}
}

Expand Down

0 comments on commit d651d9c

Please sign in to comment.