- Timestamp:
- Nov 4, 2015, 10:25:42 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/modules/questsystem/QuestManager.cc
r10624 r10765 93 93 bool QuestManager::registerQuest(Quest* quest) 94 94 { 95 if(quest == NULL)96 { 97 orxout(internal_error, context::quests) << "Quest pointer is NULL." << endl;95 if(quest == nullptr) 96 { 97 orxout(internal_error, context::quests) << "Quest pointer is nullptr." << endl; 98 98 return false; 99 99 } … … 135 135 bool QuestManager::registerHint(QuestHint* hint) 136 136 { 137 if(hint == NULL)138 { 139 orxout(internal_error, context::quests) << "Quest pointer is NULL." << endl;137 if(hint == nullptr) 138 { 139 orxout(internal_error, context::quests) << "Quest pointer is nullptr." << endl; 140 140 return false; 141 141 } … … 173 173 @return 174 174 Returns a pointer to the Quest with the input id. 175 Returns NULLif there is no Quest with the given questId.175 Returns nullptr if there is no Quest with the given questId. 176 176 @throws 177 177 Throws an exception if the given questId is invalid. … … 188 188 else 189 189 { 190 quest = NULL;190 quest = nullptr; 191 191 orxout(internal_warning, context::quests) << "The quest with id {" << questId << "} is nowhere to be found." << endl; 192 192 } … … 202 202 @return 203 203 Returns a pointer to the QuestHint with the input id. 204 Returns NULLif there is no QuestHint with the given hintId.204 Returns nullptr if there is no QuestHint with the given hintId. 205 205 @throws 206 206 Throws an exception if the given hintId is invalid. … … 217 217 else 218 218 { 219 hint = NULL;219 hint = nullptr; 220 220 orxout(internal_warning, context::quests) << "The hint with id {" << hintId << "} is nowhere to be found." << endl; 221 221 } … … 237 237 for(std::map<std::string, Quest*>::iterator it = this->questMap_.begin(); it != this->questMap_.end(); it++) 238 238 { 239 if(it->second->getParentQuest() == NULL&& !it->second->isInactive(player))239 if(it->second->getParentQuest() == nullptr && !it->second->isInactive(player)) 240 240 numQuests++; 241 241 } … … 257 257 for(std::map<std::string, Quest*>::iterator it = this->questMap_.begin(); it != this->questMap_.end(); it++) 258 258 { 259 if(it->second->getParentQuest() == NULL&& !it->second->isInactive(player) && index-- == 0)259 if(it->second->getParentQuest() == nullptr && !it->second->isInactive(player) && index-- == 0) 260 260 return it->second; 261 261 } 262 return NULL;262 return nullptr; 263 263 } 264 264 … … 275 275 int QuestManager::getNumSubQuests(Quest* quest, PlayerInfo* player) 276 276 { 277 if(quest == NULL)277 if(quest == nullptr) 278 278 return this->getNumRootQuests(player); 279 279 … … 300 300 Quest* QuestManager::getSubQuest(Quest* quest, PlayerInfo* player, int index) 301 301 { 302 if(quest == NULL)302 if(quest == nullptr) 303 303 return this->getRootQuest(player, index); 304 304 … … 309 309 return *it; 310 310 } 311 return NULL;311 return nullptr; 312 312 } 313 313 … … 354 354 return *it; 355 355 } 356 return NULL;356 return nullptr; 357 357 } 358 358 … … 367 367 Quest* QuestManager::getParentQuest(Quest* quest) 368 368 { 369 OrxAssert(quest, "The input Quest is NULL.");369 OrxAssert(quest, "The input Quest is nullptr."); 370 370 return quest->getParentQuest(); 371 371 } … … 381 381 QuestDescription* QuestManager::getDescription(Quest* item) 382 382 { 383 OrxAssert(item, "The input Quest is NULL.");383 OrxAssert(item, "The input Quest is nullptr."); 384 384 return item->getDescription(); 385 385 } … … 395 395 QuestDescription* QuestManager::getDescription(QuestHint* item) 396 396 { 397 OrxAssert(item, "The input QuestHint is NULL.");397 OrxAssert(item, "The input QuestHint is nullptr."); 398 398 return item->getDescription(); 399 399 } … … 409 409 const std::string QuestManager::getId(Quest* item) const 410 410 { 411 OrxAssert(item, "The input Quest is NULL.");411 OrxAssert(item, "The input Quest is nullptr."); 412 412 return item->getId(); 413 413 } … … 423 423 const std::string QuestManager::getId(QuestHint* item) const 424 424 { 425 OrxAssert(item, "The input QuestHint is NULL.");425 OrxAssert(item, "The input QuestHint is nullptr."); 426 426 return item->getId(); 427 427 } … … 440 440 { 441 441 PlayerInfo* player = GUIManager::getInstance().getPlayer(guiName); 442 if(player == NULL)442 if(player == nullptr) 443 443 { 444 444 orxout(internal_error, context::quests) << "GUIOverlay with name '" << guiName << "' has no player." << endl; 445 return NULL;445 return nullptr; 446 446 } 447 447
Note: See TracChangeset
for help on using the changeset viewer.