From 617eec338a9cc3813309a4c1c78cad0f1ab7680b Mon Sep 17 00:00:00 2001 From: Bo Svensson <90132211+bosvensson1@users.noreply.github.com> Date: Wed, 13 Oct 2021 14:12:47 +0000 Subject: [PATCH] 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. --- components/resource/bulletshapemanager.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/components/resource/bulletshapemanager.cpp b/components/resource/bulletshapemanager.cpp index 0d0f81962b..5b6dce067c 100644 --- a/components/resource/bulletshapemanager.cpp +++ b/components/resource/bulletshapemanager.cpp @@ -4,7 +4,6 @@ #include #include #include -#include #include @@ -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)));