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

Fix usage of CompareFirst/SecondBodyName return value #1361

Merged
merged 3 commits into from
Mar 12, 2024

Conversation

Puttichai
Copy link
Collaborator

Summary

The recently added CompareFirstBodyName and CompareSecondBodyName functions in CollisionPairInfo return 0 when the given string compares equal to the first and second body names, respectively.

There are some places that expect to test for equality but are missing the test == 0.

For example, in StateCheckEndEffector::_CheckCollisionPair, the condition reads

if( !!pbody && cpinfo.CompareSecondBodyName(pbody->GetName()) ) {

while the original code reads

if( it->GetBody() == pcolliding ) {

@Puttichai Puttichai requested a review from rdiankov March 8, 2024 06:20
@rdiankov rdiankov merged commit e36bcd7 into production Mar 12, 2024
1 check passed
@rdiankov rdiankov deleted the fix_StateCheckEndEffector_20240308 branch March 12, 2024 11:16
@rdiankov
Copy link
Owner

thanks!

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