Page 1 of 1

Recommended change for double precision compiling

Posted: Tue Apr 19, 2005 1:29 pm
by Van
Compiler: MS 7.1

File: OgreAutoParamDataSource.cpp
Line: 401

Symptom:
When compiling with #define OGRE_DOUBLE_PRECISION 1 the following code failes compilation because the compiler can not resolve the intended overload to use:

Code: Select all


	Real AutoParamDataSource::getTime_0_X(Real x) const
	{
		return fmod(Root::getSingleton().getTimer()->getMilliseconds() / 1000.0f
			, x);
	}

I changed it to

Code: Select all


	Real AutoParamDataSource::getTime_0_X(Real x) const
	{
		return fmod((Ogre::Real) Root::getSingleton().getTimer()->getMilliseconds() / 1000.0f
			, x);
	}

which made the compiler happy.

Posted: Tue Apr 19, 2005 5:47 pm
by jacmoe
You can submit a patch for it - otherwise it will get lost here :wink:

Posted: Tue Apr 19, 2005 6:18 pm
by sinbad
Odd, that code builds just fine without modifications for me with OGRE_DOUBLE_PRECISION 1. Must be a VC7.1 thing.