Changeset 11071 for code/trunk/src/modules/pong/PongScore.cc
- Timestamp:
- Jan 17, 2016, 10:29:21 PM (8 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/modules/pong/PongScore.cc
r10624 r11071 55 55 RegisterObject(PongScore); 56 56 57 this->owner_ = 0;57 this->owner_ = nullptr; 58 58 59 59 this->bShowName_ = false; … … 97 97 98 98 // If the owner is set. The owner being a Pong game. 99 if (this->owner_ != NULL)99 if (this->owner_ != nullptr) 100 100 { 101 101 if (!this->owner_->hasEnded()) … … 113 113 114 114 // Save the name and score of each player as a string. 115 if (player1_ != NULL)115 if (player1_ != nullptr) 116 116 { 117 117 name1 = player1_->getName(); 118 118 score1 = multi_cast<std::string>(this->owner_->getScore(player1_)); 119 119 } 120 if (player2_ != NULL)120 if (player2_ != nullptr) 121 121 { 122 122 name2 = player2_->getName(); … … 128 128 if (this->bShowLeftPlayer_) 129 129 { 130 if (this->bShowName_ && this->bShowScore_ && player1_ != NULL)130 if (this->bShowName_ && this->bShowScore_ && player1_ != nullptr) 131 131 output1 = name1 + " - " + score1; 132 132 else if (this->bShowScore_) … … 139 139 if (this->bShowRightPlayer_) 140 140 { 141 if (this->bShowName_ && this->bShowScore_ && player2_ != NULL)141 if (this->bShowName_ && this->bShowScore_ && player2_ != nullptr) 142 142 output2 = score2 + " - " + name2; 143 143 else if (this->bShowScore_) … … 163 163 @brief 164 164 Is called when the owner changes. 165 Sets the owner to NULL, if it is not a pointer to a Pong game.165 Sets the owner to nullptr, if it is not a pointer to a Pong game. 166 166 */ 167 167 void PongScore::changedOwner() … … 169 169 SUPER(PongScore, changedOwner); 170 170 171 if (this->getOwner() != NULL&& this->getOwner()->getGametype())171 if (this->getOwner() != nullptr && this->getOwner()->getGametype()) 172 172 this->owner_ = orxonox_cast<Pong*>(this->getOwner()->getGametype()); 173 173 else 174 this->owner_ = 0;174 this->owner_ = nullptr; 175 175 } 176 176 }
Note: See TracChangeset
for help on using the changeset viewer.