Use map<> in IniFile.

This has a side-effect: written INIs are sorted by key and name.
Unintentional, but not necessarily a bad thing ...
This commit is contained in:
Glenn Maynard
2002-10-24 23:08:18 +00:00
parent dc43775b83
commit 0a73e01186
4 changed files with 74 additions and 127 deletions
+6 -5
View File
@@ -74,14 +74,15 @@ void InputMapper::ReadMappingsFromDisk()
if( !ini.ReadFile() )
LOG->Warn( "could not input mapping file '%s'.", sPath );
IniFile::key* pKey = ini.GetKey( "Input" );
IniFile::const_iterator Key = ini.GetKey( "Input" );
if( pKey != NULL )
if( Key != ini.end() )
{
for( int i=0; i<pKey->names.GetSize(); i++ )
for( IniFile::key::const_iterator i = Key->second.begin();
i != Key->second.end(); ++i )
{
CString name = pKey->names[i];
CString value = pKey->values[i];
CString name = i->first;
CString value = i->second;
GameInput GameI;
GameI.fromString( name );