Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 11, 2010, 11:34:20 AM (15 years ago)
Author:
rgrieder
Message:

Removed a ton of msvc warnings revealed with OGRE v1.7 (they removed the warning suppressors in OgrePrerequisites.h).
All of them are conversions from one type to another that might be lossy (mostly double to float, please always use "3.7f" instead of "3.7" as constants when using floats).

Location:
code/trunk/src/libraries
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/core/GUIManager.cc

    r6417 r6502  
    145145
    146146        // Align CEGUI mouse with OIS mouse
    147         guiSystem_->injectMousePosition(mousePosition.first, mousePosition.second);
     147        guiSystem_->injectMousePosition((float)mousePosition.first, (float)mousePosition.second);
    148148
    149149        // Hide the mouse cursor unless playing in full screen mode
  • code/trunk/src/libraries/core/Game.cc

    r6422 r6502  
    284284        uint64_t currentTime = gameClock_->getMicroseconds();
    285285        uint64_t currentRealTime = gameClock_->getRealMicroseconds();
    286         this->statisticsTickTimes_.back().tickLength += currentRealTime - currentTime;
    287         this->periodTickTime_ += currentRealTime - currentTime;
     286        this->statisticsTickTimes_.back().tickLength += (uint32_t)(currentRealTime - currentTime);
     287        this->periodTickTime_ += (uint32_t)(currentRealTime - currentTime);
    288288        if (this->periodTime_ > this->statisticsRefreshCycle_)
    289289        {
     
    318318        while (currentRealTime < nextTime - minimumSleepTime_)
    319319        {
    320             usleep(nextTime - currentRealTime);
     320            usleep((unsigned long)(nextTime - currentRealTime));
    321321            currentRealTime = gameClock_->getRealMicroseconds();
    322322        }
    323323        // Integrate excess to avoid steady state error
    324         excessSleepTime_ = currentRealTime - nextTime;
     324        excessSleepTime_ = (int)(currentRealTime - nextTime);
    325325        // Anti windup
    326326        if (excessSleepTime_ > 50000) // 20ms is about the maximum time Windows would sleep for too long
  • code/trunk/src/libraries/core/GraphicsManager.cc

    r6417 r6502  
    366366        uint64_t timeAfterTick = time.getRealMicroseconds();
    367367        // Subtract the time used for rendering from the tick time counter
    368         Game::getInstance().subtractTickTime(timeAfterTick - timeBeforeTick);
     368        Game::getInstance().subtractTickTime((int32_t)(timeAfterTick - timeBeforeTick));
    369369
    370370        // again, just to be sure OGRE works fine
  • code/trunk/src/libraries/util/Math.h

    r6417 r6502  
    7979    inline T sgn(T x)
    8080    {
    81         return (x >= 0) ? 1 : -1;
     81        return (x >= 0) ? (T)1 : (T)-1;
    8282    }
    8383
Note: See TracChangeset for help on using the changeset viewer.