mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-24 13:43:43 +00:00
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.
This commit is contained in:
parent
6b482d0b52
commit
617eec338a
@ -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…
x
Reference in New Issue
Block a user