Gui: Use getObject<T>() helpers in classes
This commit is generated using regex based find and replace: ``` s/[\w:]+_cast\s*<([^>]+)\*>\s*\(\s*getObject\(\s*\)\)/getObject<$1>/ s/[\w:]+_cast\s*<([^>]+)\*>\s*\(\s*([^)]*)\s*->\s*getObject\(\s*\)\)/$2->getObject<$1>()/ ``` To regenerate if needed.
This commit is contained in:
@@ -65,7 +65,7 @@ bool ViewProviderFemConstraintRigidBody::setEdit(int ModNum)
|
||||
|
||||
void ViewProviderFemConstraintRigidBody::updateData(const App::Property* prop)
|
||||
{
|
||||
auto obj = static_cast<Fem::ConstraintRigidBody*>(this->getObject());
|
||||
auto obj = this->getObject<Fem::ConstraintRigidBody>();
|
||||
|
||||
if (prop == &obj->ReferenceNode) {
|
||||
updateSymbol();
|
||||
@@ -78,7 +78,7 @@ void ViewProviderFemConstraintRigidBody::transformExtraSymbol() const
|
||||
{
|
||||
SoTransform* symTrans = getExtraSymbolTransform();
|
||||
if (symTrans) {
|
||||
auto obj = static_cast<const Fem::ConstraintRigidBody*>(this->getObject());
|
||||
auto obj = this->getObject<const Fem::ConstraintRigidBody>();
|
||||
float s = obj->getScaleFactor();
|
||||
const Base::Vector3d& refNode = obj->ReferenceNode.getValue();
|
||||
SbVec3f tra(refNode.x, refNode.y, refNode.z);
|
||||
|
||||
Reference in New Issue
Block a user