Changeset 7221 in orxonox.OLD for trunk/src/util/object_manager.cc
- Timestamp:
- Mar 15, 2006, 3:10:45 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/util/object_manager.cc
r7198 r7221 97 97 * this function also does a transformation from omList as char* to OM_LIST. 98 98 */ 99 void ObjectManager::toList (WorldEntity* entity, const char*omList)99 void ObjectManager::toList (WorldEntity* entity, const std::string& omList) 100 100 { 101 101 this->toList(entity, ObjectManager::StringToOMList(omList)); … … 153 153 * @param level: level 0: only show list info; level 1: also show entities and their names. 154 154 */ 155 void ObjectManager::debug(const char*listName, unsigned int level)155 void ObjectManager::debug(const std::string& listName, unsigned int level) 156 156 { 157 157 PRINT(0)("=================================\n"); 158 158 PRINT(0)("=ObjectManager-DEBUG=============\n"); 159 159 PRINT(0)("=================================\n"); 160 if (listName == NULL || listName[0] == '\0')160 if (listName.empty()) 161 161 for (unsigned int i = 0; i < OM_SIZE; ++i) 162 162 debug((OM_LIST) i, level); … … 189 189 * @returns the OM_LIST transformed from listName. or the default, if not found or NULL. 190 190 */ 191 OM_LIST ObjectManager::StringToOMList(const char*listName)192 { 193 if (unlikely(listName == NULL)) return OM_DEFAULT_LIST;191 OM_LIST ObjectManager::StringToOMList(const std::string& listName) 192 { 193 if (unlikely(listName.empty())) return OM_DEFAULT_LIST; 194 194 195 195 for(unsigned int i = 0; i < OM_SIZE; ++i) { 196 if( !strcmp(listName, ObjectManager::objectManagerListNames[i])) {196 if(listName == ObjectManager::objectManagerListNames[i]) { 197 197 return (OM_LIST)i; 198 198 }
Note: See TracChangeset
for help on using the changeset viewer.