Closed jwnimmer-tri closed 4 days ago
+@sherm1 for a first look of this new pattern, please. If you like it, I'll replicate the same pattern to all of the joint types.
CC @rpoyner-tri FYI
Right, I don't know if there is a performance benefit either. The question is do we want inline static_cast in the header, or stick with dynamic_cast and move the function bodies to the cc file instead? Either way resolves the styleguide violation. If we think these have no reason to be inline, then I'm happy to just move them to the cc file as-is (possibly still de-duplicating a bit).
Okay, I've pushed the same approach to all joints now.
Using
dynamic_cast
in an inline function is verboten per our style guide. This commit replaces it with astatic_cast
. This change is tangentially inspired by #22204.We could move the existing implementation to the cc file instead, but fixing the cast seems to me like the better approach.
This change is