Changeset 11071 for code/trunk/src/modules/tetris/TetrisScore.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/tetris/TetrisScore.cc
r10624 r11071 36 36 37 37 #include "core/CoreIncludes.h" 38 #include "core/XMLPort.h"39 38 #include "util/Convert.h" 40 39 … … 56 55 RegisterObject(TetrisScore); 57 56 58 this->owner_ = 0;59 this->player_ = NULL;57 this->owner_ = nullptr; 58 this->player_ = nullptr; 60 59 } 61 60 … … 66 65 TetrisScore::~TetrisScore() 67 66 { 68 }69 70 /**71 @brief72 Method to create a TetrisScore through XML.73 */74 void TetrisScore::XMLPort(Element& xmlelement, XMLPort::Mode mode)75 {76 SUPER(TetrisScore, XMLPort, xmlelement, mode);77 67 } 78 68 … … 89 79 90 80 // If the owner is set. The owner being a Tetris game. 91 if (this->owner_ != NULL)81 if (this->owner_ != nullptr) 92 82 { 93 83 std::string score("0"); … … 101 91 { 102 92 // Save the name and score of each player as a string. 103 if (player_ != NULL)93 if (player_ != nullptr) 104 94 score = multi_cast<std::string>(this->owner_->getScore(player_)); 105 95 } … … 111 101 @brief 112 102 Is called when the owner changes. 113 Sets the owner to NULL, if it is not a pointer to a Tetris game.103 Sets the owner to nullptr, if it is not a pointer to a Tetris game. 114 104 */ 115 105 void TetrisScore::changedOwner() … … 117 107 SUPER(TetrisScore, changedOwner); 118 108 119 if (this->getOwner() != NULL&& this->getOwner()->getGametype())109 if (this->getOwner() != nullptr && this->getOwner()->getGametype()) 120 110 this->owner_ = orxonox_cast<Tetris*>(this->getOwner()->getGametype()); 121 111 else 122 this->owner_ = 0;112 this->owner_ = nullptr; 123 113 } 124 114 }
Note: See TracChangeset
for help on using the changeset viewer.