Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 10, 2016, 1:54:11 PM (8 years ago)
Author:
landauf
Message:

merged branch cpp11_v2 into cpp11_v3

Location:
code/branches/cpp11_v3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v3

  • code/branches/cpp11_v3/src/modules/tetris/TetrisBrick.cc

    r10624 r11054  
    8181            this->attach(stone);
    8282            this->formBrick(stone, i);
    83             if(this->tetris_ != NULL)
     83            if(this->tetris_ != nullptr)
    8484            {
    8585                stone->setGame(this->tetris_);
    86                 if(this->tetris_->getCenterpoint() != NULL)
     86                if(this->tetris_->getCenterpoint() != nullptr)
    8787                    stone->addTemplate(this->tetris_->getCenterpoint()->getStoneTemplate());
    8888                else
    89                     orxout()<< "tetris_->getCenterpoint == NULL in TetrisBrick.cc"<< endl;
     89                    orxout()<< "tetris_->getCenterpoint == nullptr in TetrisBrick.cc"<< endl;
    9090            }
    9191            else
    92                 orxout()<< "tetris_ == NULL in TetrisBrick.cc"<< endl;
     92                orxout()<< "tetris_ == nullptr in TetrisBrick.cc"<< endl;
    9393        }
    9494    }
     
    161161        if(i < this->brickStones_.size())
    162162            return this->brickStones_[i];
    163         else return NULL;
     163        else return nullptr;
    164164    }
    165165
     
    167167    Tetris* TetrisBrick::getTetris()
    168168    {
    169         if (this->getGametype() != NULL && this->getGametype()->isA(Class(Tetris)))
     169        if (this->getGametype() != nullptr && this->getGametype()->isA(Class(Tetris)))
    170170        {
    171171            Tetris* tetrisGametype = orxonox_cast<Tetris*>(this->getGametype());
    172172            return tetrisGametype;
    173173        }
    174         return NULL;
     174        return nullptr;
    175175    }
    176176
     
    239239    {
    240240        assert(this->tetris_);
    241         for(unsigned int i = 0; i < this->brickStones_.size(); i++)
    242         {
    243             this->brickStones_[i]->detachFromParent();
    244             this->brickStones_[i]->attachToParent(center);
    245             this->brickStones_[i]->setPosition(this->getPosition()+this->tetris_->rotateVector(this->brickStones_[i]->getPosition(),this->rotationCount_ ));
     241        for(TetrisStone* stone : this->brickStones_)
     242        {
     243            stone->detachFromParent();
     244            stone->attachToParent(center);
     245            stone->setPosition(this->getPosition()+this->tetris_->rotateVector(stone->getPosition(),this->rotationCount_ ));
    246246        }
    247247        this->brickStones_.clear();
Note: See TracChangeset for help on using the changeset viewer.