some MFCisms to STLisms (both currently work on CArray)
This commit is contained in:
@@ -86,12 +86,12 @@ bool IniFile::ReadFile()
|
||||
void IniFile::WriteFile()
|
||||
{
|
||||
FILE* fp = fopen( path, "w" );
|
||||
for (int keynum = 0; keynum <= names.GetUpperBound(); keynum++)
|
||||
for (unsigned keynum = 0; keynum < names.size(); keynum++)
|
||||
{
|
||||
if (keys[keynum].names.GetSize() != 0)
|
||||
{
|
||||
fprintf( fp, "[%s]\n", names[keynum] );
|
||||
for (int valuenum = 0; valuenum <= keys[keynum].names.GetUpperBound(); valuenum++)
|
||||
for (unsigned valuenum = 0; valuenum < keys[keynum].names.size(); valuenum++)
|
||||
fprintf( fp, "%s=%s\n", keys[keynum].names[valuenum], keys[keynum].values[valuenum] );
|
||||
fprintf( fp, "\n" );
|
||||
}
|
||||
@@ -102,8 +102,8 @@ void IniFile::WriteFile()
|
||||
//deletes all stored ini data
|
||||
void IniFile::Reset()
|
||||
{
|
||||
keys.SetSize(0);
|
||||
names.SetSize(0);
|
||||
keys.clear();
|
||||
names.clear();
|
||||
}
|
||||
|
||||
//returns number of keys currently in the ini
|
||||
|
||||
@@ -307,8 +307,7 @@ MusicWheel::MusicWheel()
|
||||
|
||||
// init m_mapGroupNameToBannerColor
|
||||
|
||||
CArray<Song*, Song*> arraySongs;
|
||||
arraySongs.Copy( SONGMAN->m_pSongs );
|
||||
CArray<Song*, Song*> arraySongs = SONGMAN->m_pSongs;
|
||||
SortSongPointerArrayByGroup( arraySongs );
|
||||
|
||||
m_sExpandedSectionName = "";
|
||||
|
||||
@@ -166,7 +166,7 @@ bool BMSLoader::LoadFromBMSFile( const CString &sPath, Notes &out )
|
||||
// valuename, sNoteData, iMeasureNo, iNoteNum, iNumNotesInThisMeasure );
|
||||
for( int j=0; j<iNumNotesInThisMeasure; j++ )
|
||||
{
|
||||
if( arrayNotes.GetAt(j) == TRUE )
|
||||
if( arrayNotes[j] )
|
||||
{
|
||||
float fPercentThroughMeasure = (float)j/(float)iNumNotesInThisMeasure;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user