reactphysics3d
reactphysics3d copied to clipboard
Comparing if uint8 is less than 256
Comparing if an uint8 is less than 256 is always true so therefore a potential bug. At least one example is comparisons with NB_MAX_CONTACT_POINTS_IN_POTENTIAL_MANIFOLD. In general, eliminating all compiler warnings should be a goal.
Sure the comparison is not necessary.
Can I ask you where in the code you have found this comparison?
CollisionDetectionSystem.cpp, line 1218 if (contactManifoldInfo.nbPotentialContactPoints < NB_MAX_CONTACT_POINTS_IN_POTENTIAL_MANIFOLD)
and line 1283 if (potentialContactManifolds[contactManifoldIndex].nbPotentialContactPoints < NB_MAX_CONTACT_POINTS_IN_POTENTIAL_MANIFOLD)
This is not valid anymore in in version v0.10.0 of the library. Thanks a lot for reporting the issue.