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/overlays/OrxonoxOverlay.cc

    r3300 r3301  
    8282        // Get aspect ratio from the render window. Later on, we get informed automatically
    8383        Ogre::RenderWindow* defaultWindow = GraphicsManager::getInstance().getRenderWindow();
    84         this->windowAspectRatio_ = (float)defaultWindow->getWidth() / defaultWindow->getHeight();
     84        this->windowAspectRatio_ = static_cast<float>(defaultWindow->getWidth()) / defaultWindow->getHeight();
    8585        this->sizeCorrectionChanged();
    8686
     
    183183    void OrxonoxOverlay::windowResized(unsigned int newWidth, unsigned int newHeight)
    184184    {
    185         this->windowAspectRatio_ = newWidth/(float)newHeight;
     185        this->windowAspectRatio_ = static_cast<float>(newWidth) / newHeight;
    186186        this->sizeCorrectionChanged();
    187187    }
     
    215215            if (angle < 0.0)
    216216                angle = -angle;
    217             angle -= 180.0f * static_caste<int>(angle / 180.0);
     217            angle -= 180.0f * static_cast<int>(angle / 180.0);
    218218
    219219            // take the reverse if angle is about 90 degrees
Note: See TracChangeset for help on using the changeset viewer.