Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 18, 2009, 4:03:59 PM (15 years ago)
Author:
rgrieder
Message:

Found even more casts. They sure aren't all of them, but I hope to have caught every pointer C-style cast because they can be very dangerous.
Note: I didn't do the pointer casts in the network library because that would have taken way too long.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/tools/Timer.h

    r3300 r3301  
    103103            /** @brief Gives the Timer some extra time. @param time The amount of extra time in seconds */
    104104            inline void addTime(float time)
    105                 { if (time > 0.0f) this->time_ += (long long)(time * 1000000.0f); }
     105                { if (time > 0.0f) this->time_ += static_cast<long long>(time * 1000000.0f); }
    106106            /** @brief Decreases the remaining time of the Timer. @param time The amount of time to remove */
    107107            inline void removeTime(float time)
    108                 { if (time > 0.0f) this->time_ -= (long long)(time * 1000000.0f); }
     108                { if (time > 0.0f) this->time_ -= static_cast<long long>(time * 1000000.0f); }
    109109            /** @brief Sets the interval of the Timer. @param interval The interval */
    110110            inline void setInterval(float interval)
    111                 { this->interval_ = (long long)(interval * 1000000.0f); }
     111                { this->interval_ = static_cast<long long>(interval * 1000000.0f); }
    112112            /** @brief Sets bLoop to a given value. @param bLoop True = loop */
    113113            inline void setLoop(bool bLoop)
Note: See TracChangeset for help on using the changeset viewer.