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/controllers/SectionController.cc

    r11071 r11083  
    5959    void SectionController::action()
    6060    {
    61         if (!this || !this->getControllableEntity() || !this->isActive())
     61        if (!this->getControllableEntity() || !this->isActive())
    6262            return;
    6363
     
    6666        {
    6767            ActionpointController* newDivisionLeader = findNewDivisionLeader();
    68             if (!this || !this->getControllableEntity())
    69                 return;
    7068
    7169            this->myDivisionLeader_ = newDivisionLeader;
     
    7876        {
    7977            ActionpointController::action();
    80             if (!this || !this->getControllableEntity())
    81                 return;
    8278            if (!(this->parsedActionpoints_.empty() && this->loopActionpoints_.empty()))
    8379            {
     
    9894            else if (!this->myDivisionLeader_->bKeepFormation_)
    9995            {
    100                 if (!this || !this->getControllableEntity())
    101                     return;
    10296
    10397                if (!this->hasTarget())
     
    121115        if (action == Action::FIGHT || action == Action::FIGHTALL || action == Action::ATTACK)
    122116        {
    123             Pawn* target;
     117            Pawn* target = nullptr;
    124118            //----if he has a target----
    125119            if (this->myDivisionLeader_->hasTarget())
Note: See TracChangeset for help on using the changeset viewer.