Changeset 10765 for code/branches/cpp11_v2/src/orxonox/items
- Timestamp:
- Nov 4, 2015, 10:25:42 PM (9 years ago)
- Location:
- code/branches/cpp11_v2/src/orxonox/items
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/orxonox/items/Engine.cc
r9667 r10765 155 155 void Engine::run(float dt) 156 156 { 157 if (this->ship_ == NULL)157 if (this->ship_ == nullptr) 158 158 { 159 159 if (this->shipID_ != 0) … … 161 161 this->networkcallback_shipID(); 162 162 163 if (this->ship_ == NULL)163 if (this->ship_ == nullptr) 164 164 return; 165 165 } -
code/branches/cpp11_v2/src/orxonox/items/Engine.h
r9667 r10765 67 67 /** 68 68 @brief Get the SpaceShip this Engine is mounted on. 69 @return Returns a pointer to the SpaceShip. NULLif it isn't mounted on any ship.69 @return Returns a pointer to the SpaceShip. nullptr if it isn't mounted on any ship. 70 70 */ 71 71 inline SpaceShip* getShip() const -
code/branches/cpp11_v2/src/orxonox/items/MultiStateEngine.cc
r9939 r10765 205 205 void MultiStateEngine::addEffectContainer(EffectContainer* effect) 206 206 { 207 if (effect == NULL)207 if (effect == nullptr) 208 208 return; 209 209 effect->setLuaState(this->lua_, 'f' + multi_cast<std::string>(this->effectContainers_.size())); … … 224 224 return (*it); 225 225 } 226 return NULL;226 return nullptr; 227 227 } 228 228 -
code/branches/cpp11_v2/src/orxonox/items/ShipPart.cc
r10624 r10765 50 50 51 51 ShipPart::ShipPart(Context* context) 52 : Item(context), parent_( NULL)52 : Item(context), parent_(nullptr) 53 53 { 54 54 RegisterObject(ShipPart); … … 122 122 void ShipPart::addEntity(StaticEntity* entity) 123 123 { 124 OrxAssert(entity != NULL, "The Entity cannot be NULL.");124 OrxAssert(entity != nullptr, "The Entity cannot be nullptr."); 125 125 this->entityList_.push_back(entity); 126 126 } … … 130 130 Get the i-th StaticEntity of the ShipPart. 131 131 @return 132 Returns a pointer to the i-the StaticEntity. NULLif there is no StaticEntity with that index.132 Returns a pointer to the i-the StaticEntity. nullptr if there is no StaticEntity with that index. 133 133 */ 134 134 StaticEntity* ShipPart::getEntity(unsigned int index) 135 135 { 136 136 if(this->entityList_.size() >= index) 137 return NULL;137 return nullptr; 138 138 else 139 139 return this->entityList_[index]; … … 164 164 void ShipPart::addDestructionEvent(PartDestructionEvent* event) 165 165 { 166 OrxAssert(event != NULL, "The PartDestructionEvent cannot be NULL.");166 OrxAssert(event != nullptr, "The PartDestructionEvent cannot be nullptr."); 167 167 event->setParent(this); 168 168 this->eventList_.push_back(event); … … 173 173 Get the i-th PartDestructionEvent of the ShipPart. 174 174 @return 175 Returns a pointer to the i-the PartDestructionEvent. NULLif there is no PartDestructionEvent with that index.175 Returns a pointer to the i-the PartDestructionEvent. nullptr if there is no PartDestructionEvent with that index. 176 176 */ 177 177 PartDestructionEvent* ShipPart::getDestructionEvent(unsigned int index) 178 178 { 179 179 if(this->eventList_.size() <= index) 180 return NULL;180 return nullptr; 181 181 else 182 182 return this->eventList_[index];
Note: See TracChangeset
for help on using the changeset viewer.