Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 11, 2010, 11:34:20 AM (14 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).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.