The dynamic_cast operation does not meet our styleguide requirements for being inline. We either need to get rid of the cast (by simplifying the function), or move its definition to the cc file.
(Technically the GetParentPlant is a public function so the commit subject isn't quite right, but anyway it seems reasonable to change it here, too, since its fix shares a mechanism within this cohort.)
The
dynamic_cast
operation does not meet our styleguide requirements for being inline. We either need to get rid of the cast (by simplifying the function), or move its definition to the cc file.This change is tangentially inspired by https://github.com/RobotLocomotion/drake/issues/22204.
(Technically the
GetParentPlant
is a public function so the commit subject isn't quite right, but anyway it seems reasonable to change it here, too, since its fix shares a mechanism within this cohort.)This change is