Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 12, 2006, 8:54:30 AM (18 years ago)
Author:
bensch
Message:

orxonox/std:: compile and run again, with many more std::strings….

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/std/src/lib/physics/physics_engine.cc

    r7193 r7216  
    128128  @returns the PhysicsInterface if found, or NULL if not
    129129 */
    130 PhysicsInterface* PhysicsEngine::getPhysicsInterfaceByName(const char* physicsInterfaceName) const
     130PhysicsInterface* PhysicsEngine::getPhysicsInterfaceByName(const std::string& physicsInterfaceName) const
    131131{
    132132  BaseObject* interface = ClassList::getObject(physicsInterfaceName, CL_PHYSICS_INTERFACE);
     
    157157
    158158/**
    159 * @param FieldName the Name of the PhysicsInterface to search for
     159* @param fieldName the Name of the PhysicsInterface to search for
    160160  @returns the Field if found, or NULL if not
    161161 */
    162 Field* PhysicsEngine::getFieldByName(const char* FieldName) const
     162Field* PhysicsEngine::getFieldByName(const std::string& fieldName) const
    163163{
    164164  list<Field*>::const_iterator field;
    165165  for (field = this->fields.begin(); field != this->fields.end(); field++)
    166     if (!strcmp(FieldName, (*field)->getName()))
     166    if (fieldName == (*field)->getName())
    167167      return (*field);
    168168  return NULL;
     
    197197  @returns the PhysicsConnection if found, or NULL if not
    198198 */
    199 PhysicsConnection* PhysicsEngine::getPhysicsConnectionByName(const char* physicsConnectionName) const
     199PhysicsConnection* PhysicsEngine::getPhysicsConnectionByName(const std::string& physicsConnectionName) const
    200200{
    201201  list<PhysicsConnection*>::const_iterator pc;
    202202  for (pc = this->connections.begin(); pc != this->connections.end(); pc++)
    203     if (!strcmp(physicsConnectionName, (*pc)->getName()))
     203    if (physicsConnectionName == (*pc)->getName())
    204204      delete (*pc);
    205205  return NULL;
Note: See TracChangeset for help on using the changeset viewer.