Changeset 7203 in orxonox.OLD for branches/std/src/lib/event/key_mapper.cc
- Timestamp:
- Mar 9, 2006, 5:28:10 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/std/src/lib/event/key_mapper.cc
r6998 r7203 129 129 * @param filename: The path and name of the file to load the bindings from 130 130 */ 131 void KeyMapper::loadKeyBindings (const char*fileName)131 void KeyMapper::loadKeyBindings (const std::string& fileName) 132 132 { 133 133 IniParser parser(fileName); … … 145 145 146 146 iniParser->firstVar(); 147 while(iniParser->getCurrentName() )147 while(iniParser->getCurrentName() != "") 148 148 { 149 149 PRINTF(3)("Keys: Parsing %s, %s now.\n", iniParser->getCurrentName(), iniParser->getCurrentValue()); … … 164 164 165 165 iniParser->firstVar(); 166 while(iniParser->getCurrentName() )166 while(iniParser->getCurrentName() != "") 167 167 { 168 168 PRINTF(3)("MISC: Parsing %s, %s now.\n", iniParser->getCurrentName(), iniParser->getCurrentValue()); … … 177 177 * @param the name of the button 178 178 */ 179 int* KeyMapper::nameToIndex (const char*name)179 int* KeyMapper::nameToIndex (const std::string& name) 180 180 { 181 181 coord[0] = -1; … … 199 199 * @param id of the key 200 200 */ 201 void KeyMapper::mapKeys(const char*name, int* index)201 void KeyMapper::mapKeys(const std::string& name, int* index) 202 202 { 203 203 for( int i = 0; map[i].pValue != NULL; ++i ) 204 204 { 205 if( !strcmp (name, map[i].pName))205 if( name == map[i].pName) 206 206 { 207 207 if( index[0] == 0)
Note: See TracChangeset
for help on using the changeset viewer.