fixing MSVC 2013 warning C4244: & C4305

conversion from 'const float' to 'int', possible loss of data
conversion from 'double' to 'int', possible loss of data
conversion from 'float' to 'int', possible loss of data
This commit is contained in:
dteviot 2015-03-08 13:07:29 +13:00
parent f2ac939e61
commit e197f5318b
100 changed files with 457 additions and 474 deletions

View file

@ -26,7 +26,7 @@ namespace Render
setupRenderTarget();
mCurrentColour = Ogre::ColourValue(0.3, 0.3, 0.3);
mCurrentColour = Ogre::ColourValue(0.3f, 0.3f, 0.3f);
}
void SelectionBuffer::setupRenderTarget()
@ -145,7 +145,7 @@ namespace Render
void SelectionBuffer::getNextColour ()
{
Ogre::ARGB color = (float(rand()) / float(RAND_MAX)) * std::numeric_limits<Ogre::uint32>::max();
Ogre::ARGB color = static_cast<Ogre::ARGB>((float(rand()) / float(RAND_MAX)) * std::numeric_limits<Ogre::uint32>::max());
if (mCurrentColour.getAsARGB () == color)
{