Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7221 in orxonox.OLD for trunk/src/util/object_manager.cc


Ignore:
Timestamp:
Mar 15, 2006, 3:10:45 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the std-branche back, it runs on windows and Linux

svn merge https://svn.orxonox.net/orxonox/branches/std . -r7202:HEAD

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/util/object_manager.cc

    r7198 r7221  
    9797 * this function also does a transformation from omList as char* to OM_LIST.
    9898 */
    99 void ObjectManager::toList (WorldEntity* entity, const char* omList)
     99void ObjectManager::toList (WorldEntity* entity, const std::string& omList)
    100100{
    101101  this->toList(entity, ObjectManager::StringToOMList(omList));
     
    153153 * @param level: level 0: only show list info; level 1: also show entities and their names.
    154154 */
    155 void ObjectManager::debug(const char* listName, unsigned int level)
     155void ObjectManager::debug(const std::string& listName, unsigned int level)
    156156{
    157157  PRINT(0)("=================================\n");
    158158  PRINT(0)("=ObjectManager-DEBUG=============\n");
    159159  PRINT(0)("=================================\n");
    160   if (listName == NULL || listName[0] == '\0')
     160  if (listName.empty())
    161161    for (unsigned int i = 0; i < OM_SIZE; ++i)
    162162      debug((OM_LIST) i, level);
     
    189189 * @returns the OM_LIST transformed from listName. or the default, if not found or NULL.
    190190 */
    191 OM_LIST ObjectManager::StringToOMList(const char* listName)
    192 {
    193   if (unlikely(listName == NULL)) return OM_DEFAULT_LIST;
     191OM_LIST ObjectManager::StringToOMList(const std::string& listName)
     192{
     193  if (unlikely(listName.empty())) return OM_DEFAULT_LIST;
    194194
    195195  for(unsigned int i = 0; i < OM_SIZE; ++i) {
    196     if(!strcmp(listName, ObjectManager::objectManagerListNames[i])) {
     196    if(listName == ObjectManager::objectManagerListNames[i]) {
    197197      return (OM_LIST)i;
    198198    }
Note: See TracChangeset for help on using the changeset viewer.