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.

Location:
code/trunk/src/orxonox/objects/weaponsystem
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/objects/weaponsystem/Munition.cc

    r3196 r3301  
    354354            return false;
    355355
    356         if (amount <= (unsigned int)needed_magazines)
     356        if (amount <= static_cast<unsigned int>(needed_magazines))
    357357        {
    358358            // We need more magazines than we get, so just add them
  • code/trunk/src/orxonox/objects/weaponsystem/WeaponSystem.h

    r3196 r3301  
    8484
    8585            static const unsigned int MAX_FIRE_MODES = 8;
    86             static const unsigned int FIRE_MODE_UNASSIGNED = (unsigned int)-1;
     86            static const unsigned int FIRE_MODE_UNASSIGNED = static_cast<unsigned int>(-1);
    8787
    8888            static const unsigned int MAX_WEAPON_MODES = 8;
    89             static const unsigned int WEAPON_MODE_UNASSIGNED = (unsigned int)-1;
     89            static const unsigned int WEAPON_MODE_UNASSIGNED = static_cast<unsigned int>(-1);
    9090
    9191        private:
Note: See TracChangeset for help on using the changeset viewer.