Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Oct 5, 2021

Conversation

azeey
Copy link
Collaborator

@azeey azeey commented Oct 4, 2021

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.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
@azeey azeey force-pushed the azeey/remove_global_contact_constraint branch from 8495a45 to a72a0b4 Compare October 4, 2021 19:42
Copy link
Collaborator

@scpeters scpeters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks fine to me

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

@azeey
Copy link
Collaborator Author

azeey commented Oct 5, 2021

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 dartsim#1437. I can do the same for our fork.

@azeey azeey merged commit d2b6ee0 into release-6.10 Oct 5, 2021
@azeey azeey deleted the azeey/remove_global_contact_constraint branch October 5, 2021 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants