Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 21, 2016, 1:59:04 PM (8 years ago)
Author:
muemart
Message:

Fix some clang-tidy warnings.
Also, Serialise.h was doing some C-style casts that ended up being const casts. I moved those const casts as close to the source as possible and changed the loadAndIncrease functions to not do that.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/worldentities/pawns/SpaceShip.cc

    r11071 r11083  
    235235
    236236        // This function call adds a lift to the ship when it is rotating to make it's movement more "realistic" and enhance the feeling.
    237         if (this->getLocalVelocity().z < 0 && abs(this->getLocalVelocity().z) < stallSpeed_)
    238             this->moveRightLeft(-lift_ / 5.0f * value * sqrt(abs(this->getLocalVelocity().z)));
     237        if (this->getLocalVelocity().z < 0 && std::abs(this->getLocalVelocity().z) < stallSpeed_)
     238            this->moveRightLeft(-lift_ / 5.0f * value * sqrt(std::abs(this->getLocalVelocity().z)));
    239239    }
    240240
     
    257257
    258258        // This function call adds a lift to the ship when it is pitching to make it's movement more "realistic" and enhance the feeling.
    259         if (this->getLocalVelocity().z < 0 && abs(this->getLocalVelocity().z) < stallSpeed_)
    260             this->moveUpDown(lift_ / 5.0f * pitch * sqrt(abs(this->getLocalVelocity().z)));
     259        if (this->getLocalVelocity().z < 0 && std::abs(this->getLocalVelocity().z) < stallSpeed_)
     260            this->moveUpDown(lift_ / 5.0f * pitch * sqrt(std::abs(this->getLocalVelocity().z)));
    261261    }
    262262
     
    505505            this->shakeDt_ += dt;
    506506
    507             float frequency = this->shakeFrequency_ * (square(abs(this->getLocalVelocity().z)));
     507            float frequency = this->shakeFrequency_ * (square(std::abs(this->getLocalVelocity().z)));
    508508
    509509            if (this->shakeDt_ >= 1.0f/frequency)
Note: See TracChangeset for help on using the changeset viewer.