Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 10, 2016, 1:54:11 PM (8 years ago)
Author:
landauf
Message:

merged branch cpp11_v2 into cpp11_v3

Location:
code/branches/cpp11_v3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v3

  • code/branches/cpp11_v3/src/orxonox/controllers/ScriptController.cc

    r10622 r11054  
    6464        /* Set default values for all variables */
    6565        /* - pointers to zero */
    66         this->player_ = NULL;
    67         this->entity_ = NULL;
     66        this->player_ = nullptr;
     67        this->entity_ = nullptr;
    6868
    6969        /* - times */
     
    121121
    122122      /* Debugging: print all the scriptcontroller object pointers */
    123       for(ObjectList<ScriptController>::iterator it =
    124         ObjectList<ScriptController>::begin();
    125         it != ObjectList<ScriptController>::end(); ++it)
    126       { orxout(verbose) << "Have object in list: " << *it << endl; }
     123      for(ScriptController* controller : ObjectList<ScriptController>())
     124      { orxout(verbose) << "Have object in list: " << controller << endl; }
    127125
    128126      /* Find the first one with a nonzero ID */
    129       for(ObjectList<ScriptController>::iterator it =
    130         ObjectList<ScriptController>::begin();
    131         it != ObjectList<ScriptController>::end(); ++it)
     127      for(ScriptController* controller : ObjectList<ScriptController>())
    132128      {
    133129        // TODO: do some selection here. Currently just returns the first one
    134         if( (*it)->getID() > 0 )
    135         { orxout(verbose) << "Controller to return: " << *it << endl;
    136           return *it;
     130        if( controller->getID() > 0 )
     131        { orxout(verbose) << "Controller to return: " << controller << endl;
     132          return controller;
    137133        }
    138134     
    139135      }
    140       return NULL;
     136      return nullptr;
    141137    }
    142138
Note: See TracChangeset for help on using the changeset viewer.