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/modules/tetris/Tetris.cc

    r11071 r11083  
    140140            const Vector3& currentStonePosition = someStone->getPosition(); //!< Saves the position of the currentStone
    141141
    142             if((position.x == currentStonePosition.x) && abs(position.y-currentStonePosition.y) < this->center_->getStoneSize())
     142            if((position.x == currentStonePosition.x) && std::abs(position.y-currentStonePosition.y) < this->center_->getStoneSize())
    143143                return false;
    144144        }
     
    222222        if(position.y < this->center_->getStoneSize()/2.0f) //!< If the stone has reached the bottom of the level
    223223        {
    224             float baseOffset = abs(stone->getPosition().y);
     224            float baseOffset = std::abs(stone->getPosition().y);
    225225            if (this->activeBrick_->getRotationCount() == 1 || this->activeBrick_->getRotationCount() == 3)
    226                 baseOffset = abs(stone->getPosition().x);
     226                baseOffset = std::abs(stone->getPosition().x);
    227227            float yOffset = baseOffset + this->center_->getStoneSize()/2.0f;//calculate offset
    228228            if(yOffset < 0) //catch brake-throughs
Note: See TracChangeset for help on using the changeset viewer.