gazebo-forks / dart

Dynamic Animation and Robotics Toolkit
http://dartsim.github.io/
BSD 2-Clause "Simplified" License
6 stars 5 forks source link

Use a function-local static variable to replace globals #32

Closed azeey closed 2 years ago

azeey commented 2 years ago

We recently added global variables to avoid breaking ABI (#22). To avoid the static initialization order problem, this PR changes the globals to function-local static variables via the construct-on-first-use idiom per the Google style and C++ Core Guidelines.

azeey commented 2 years ago

I believe the CI failures are related to #28? They seem pre-existing

Yes, I was able to fix the failures by relaxing the tolerances in the upstream PR https://github.com/dartsim/dart/pull/1437. I can do the same for our fork.