optimized UnlockSystem::FindSong() function so its a O(log n) operation instead of O(n)

(improved from sequential to binary search; still may have bugs so old code is commented out)
This commit is contained in:
Andrew Wong
2003-07-09 13:54:23 +00:00
parent 059fc8e6bc
commit 402145139d
2 changed files with 43 additions and 4 deletions
+2
View File
@@ -69,6 +69,8 @@ public:
float UnlockToasty();
bool RouletteUnlock( const Song *song );
void DebugPrint();
private:
void SortSongEntriesArray(); // sorts unlocks
bool ParseRow(CString text, CString &type, float &qty, CString &songname);