Changeset 7216 in orxonox.OLD for branches/std/src/lib/physics/physics_engine.cc
- Timestamp:
- Mar 12, 2006, 8:54:30 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/std/src/lib/physics/physics_engine.cc
r7193 r7216 128 128 @returns the PhysicsInterface if found, or NULL if not 129 129 */ 130 PhysicsInterface* PhysicsEngine::getPhysicsInterfaceByName(const char*physicsInterfaceName) const130 PhysicsInterface* PhysicsEngine::getPhysicsInterfaceByName(const std::string& physicsInterfaceName) const 131 131 { 132 132 BaseObject* interface = ClassList::getObject(physicsInterfaceName, CL_PHYSICS_INTERFACE); … … 157 157 158 158 /** 159 * @param FieldName the Name of the PhysicsInterface to search for159 * @param fieldName the Name of the PhysicsInterface to search for 160 160 @returns the Field if found, or NULL if not 161 161 */ 162 Field* PhysicsEngine::getFieldByName(const char* FieldName) const162 Field* PhysicsEngine::getFieldByName(const std::string& fieldName) const 163 163 { 164 164 list<Field*>::const_iterator field; 165 165 for (field = this->fields.begin(); field != this->fields.end(); field++) 166 if ( !strcmp(FieldName, (*field)->getName()))166 if (fieldName == (*field)->getName()) 167 167 return (*field); 168 168 return NULL; … … 197 197 @returns the PhysicsConnection if found, or NULL if not 198 198 */ 199 PhysicsConnection* PhysicsEngine::getPhysicsConnectionByName(const char*physicsConnectionName) const199 PhysicsConnection* PhysicsEngine::getPhysicsConnectionByName(const std::string& physicsConnectionName) const 200 200 { 201 201 list<PhysicsConnection*>::const_iterator pc; 202 202 for (pc = this->connections.begin(); pc != this->connections.end(); pc++) 203 if ( !strcmp(physicsConnectionName, (*pc)->getName()))203 if (physicsConnectionName == (*pc)->getName()) 204 204 delete (*pc); 205 205 return NULL;
Note: See TracChangeset
for help on using the changeset viewer.