Changeset 7638 for code/branches/releasetodo/src/orxonox/LevelInfo.cc
- Timestamp:
- Nov 11, 2010, 11:21:28 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/releasetodo/src/orxonox/LevelInfo.cc
r7626 r7638 42 42 43 43 // LevelInfoItem 44 45 //! The list of allowed tags. 46 /*static*/ std::set<std::string> LevelInfoItem::possibleTags_s = std::set<std::string>(); 44 47 45 48 /** … … 73 76 { 74 77 78 } 79 80 void LevelInfoItem::initializeTags(void) 81 { 82 if(!LevelInfoItem::initialized_s) 83 { 84 LevelInfoItem::possibleTags_s.insert("test"); 85 LevelInfoItem::possibleTags_s.insert("singleplayer"); 86 LevelInfoItem::possibleTags_s.insert("multiplayer"); 87 LevelInfoItem::possibleTags_s.insert("showcase"); 88 LevelInfoItem::possibleTags_s.insert("tutorial"); 89 } 75 90 } 76 91 … … 103 118 bool LevelInfoItem::addTag(const std::string& tag, bool update) 104 119 { 120 if(!this->validateTag(tag)) 121 { 122 COUT(2) << "Bad tag '" << tag << "' in " << this->getXMLFilename() << ". Ignoring..." << std::endl; 123 return false; 124 } 105 125 bool success = this->tags_.insert(std::string(tag)).second; 106 126 if(update && success)
Note: See TracChangeset
for help on using the changeset viewer.