Changeset 2093 for code/trunk/src/orxonox/objects/quest/QuestManager.cc
- Timestamp:
 - Nov 1, 2008, 9:03:51 PM (17 years ago)
 - File:
 - 
          
- 1 edited
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
        
code/trunk/src/orxonox/objects/quest/QuestManager.cc
r2092 r2093 62 62 COUT(2) << "Registration of Quest in QuestManager failed, because inserted Quest-pointer was NULL." << std::endl; 63 63 return false; 64 }64 } 65 65 66 66 std::pair<std::map<std::string, Quest*>::iterator,bool> ret; … … 71 71 COUT(3) << "Quest with questId {" << quest->getId() << "} successfully inserted." << std::endl; 72 72 return true; 73 }74 else75 {76 COUT(2) << "Quest with the same id was already present." << std::endl;77 return false;78 }73 } 74 else 75 { 76 COUT(2) << "Quest with the same id was already present." << std::endl; 77 return false; 78 } 79 79 } 80 80 … … 102 102 COUT(3) << "QuestHint with hintId {" << hint->getId() << "} successfully inserted." << std::endl; 103 103 return true; 104 }105 else106 {107 COUT(2) << "QuestHint with the same id was already present." << std::endl;108 return false;109 }104 } 105 else 106 { 107 COUT(2) << "QuestHint with the same id was already present." << std::endl; 108 return false; 109 } 110 110 } 111 111 … … 124 124 { 125 125 if(!QuestItem::isId(questId)) 126 {126 { 127 127 ThrowException(Argument, "Invalid questId."); 128 }128 } 129 129 130 130 Quest* quest; 131 131 std::map<std::string, Quest*>::iterator it = questMap_.find(questId); 132 if (it != questMap_.end())133 {134 quest = it->second;135 }136 else137 {138 quest = NULL;139 COUT(2) << "The quest with id {" << questId << "} is nowhere to be found." << std::endl;140 }132 if (it != questMap_.end()) 133 { 134 quest = it->second; 135 } 136 else 137 { 138 quest = NULL; 139 COUT(2) << "The quest with id {" << questId << "} is nowhere to be found." << std::endl; 140 } 141 141 142 return quest;142 return quest; 143 143 144 144 } … … 158 158 { 159 159 if(!QuestItem::isId(hintId)) 160 {160 { 161 161 ThrowException(Argument, "Invalid hintId."); 162 }162 } 163 163 164 164 QuestHint* hint; 165 165 std::map<std::string, QuestHint*>::iterator it = hintMap_.find(hintId); 166 if (it != hintMap_.end())167 {168 hint = it->second;169 }170 else171 {172 hint = NULL;173 COUT(2) << "The hint with id {" << hintId << "} is nowhere to be found." << std::endl;174 }166 if (it != hintMap_.end()) 167 { 168 hint = it->second; 169 } 170 else 171 { 172 hint = NULL; 173 COUT(2) << "The hint with id {" << hintId << "} is nowhere to be found." << std::endl; 174 } 175 175 176 return hint;176 return hint; 177 177 178 178 }  
Note: See TracChangeset
          for help on using the changeset viewer.
      


            






