Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 17, 2009, 11:53:35 PM (15 years ago)
Author:
rgrieder
Message:

Found a few more C-Style casts.

Location:
code/trunk/src/orxonox/overlays/hud
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/overlays/hud/GametypeStatus.cc

    r3280 r3300  
    7070            {
    7171                if (gtinfo->isStartCountdownRunning())
    72                     this->setCaption(multi_cast<std::string>((int)ceil(gtinfo->getStartCountdown())));
     72                    this->setCaption(multi_cast<std::string>(static_cast<int>(ceil(gtinfo->getStartCountdown()))));
    7373                else if (ce->isA(Class(Spectator)))
    7474                    this->setCaption("Press [Fire] to respawn");
  • code/trunk/src/orxonox/overlays/hud/HUDBar.cc

    r3280 r3300  
    7373        // create new material
    7474        std::string materialname = "barmaterial" + multi_cast<std::string>(materialcount_s++);
    75         Ogre::MaterialPtr material = (Ogre::MaterialPtr)Ogre::MaterialManager::getSingleton().create(materialname, "General");
     75        Ogre::MaterialPtr material = static_cast<Ogre::MaterialPtr>(Ogre::MaterialManager::getSingleton().create(materialname, "General"));
    7676        material->getTechnique(0)->getPass(0)->setSceneBlending(Ogre::SBT_TRANSPARENT_ALPHA);
    7777        this->textureUnitState_ = material->getTechnique(0)->getPass(0)->createTextureUnitState();
  • code/trunk/src/orxonox/overlays/hud/HUDHealthBar.cc

    r3280 r3300  
    8383        {
    8484            this->setValue(this->owner_->getHealth() / this->owner_->getInitialHealth());
    85             this->textoverlay_->setCaption(multi_cast<std::string>((int)this->owner_->getHealth()));
     85            this->textoverlay_->setCaption(multi_cast<std::string>(static_cast<int>(this->owner_->getHealth())));
    8686        }
    8787
  • code/trunk/src/orxonox/overlays/hud/HUDTimer.cc

    r3280 r3300  
    5959            if (gametype->getTimerIsActive())
    6060            {
    61                 this->setCaption(multi_cast<std::string>((int)gametype->getTime() + 1));
     61                this->setCaption(multi_cast<std::string>(static_cast<int>(gametype->getTime()) + 1));
    6262            }
    6363        }
Note: See TracChangeset for help on using the changeset viewer.