removes version guard (#3173)

We currently use a version guard to adapt to a change in the number of parameters supplied to osg::TriangleFunctor's operator() template functor. The differing parameter is unused in our code. Crucially, operator() is not an override, so we can just add a default value for the differing parameter. Such a default allows us to apply identical code to both versions of the library without regressing functionality.
pull/3159/head
Bo Svensson 3 years ago committed by GitHub
parent 6b482d0b52
commit 617eec338a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -4,7 +4,6 @@
#include <osg/TriangleFunctor>
#include <osg/Transform>
#include <osg/Drawable>
#include <osg/Version>
#include <BulletCollision/CollisionShapes/btTriangleMesh.h>
@ -45,11 +44,7 @@ struct GetTriangleFunctor
return btVector3(vec.x(), vec.y(), vec.z());
}
#if OSG_MIN_VERSION_REQUIRED(3,5,6)
void inline operator()( const osg::Vec3& v1, const osg::Vec3& v2, const osg::Vec3& v3 )
#else
void inline operator()( const osg::Vec3& v1, const osg::Vec3& v2, const osg::Vec3& v3, bool _temp )
#endif
void inline operator()( const osg::Vec3& v1, const osg::Vec3& v2, const osg::Vec3& v3, bool _temp=false ) // Note: unused temp argument left here for OSG versions less than 3.5.6
{
if (mTriMesh)
mTriMesh->addTriangle( toBullet(mMatrix.preMult(v1)), toBullet(mMatrix.preMult(v2)), toBullet(mMatrix.preMult(v3)));

Loading…
Cancel
Save