eliminate GetData()

This commit is contained in:
Glenn Maynard
2002-10-24 08:40:27 +00:00
parent 272197a252
commit 4fa4be8161
5 changed files with 13 additions and 32 deletions
+1 -2
View File
@@ -41,8 +41,7 @@ int CompareBGSegments(const BGSegment &seg1, const BGSegment &seg2)
void SortBGSegmentArray( CArray<BGSegment,BGSegment&> &arrayBGSegments ) void SortBGSegmentArray( CArray<BGSegment,BGSegment&> &arrayBGSegments )
{ {
sort( arrayBGSegments.GetData(), arrayBGSegments.GetData()+arrayBGSegments.GetSize(), sort( arrayBGSegments.begin(), arrayBGSegments.end(), CompareBGSegments );
CompareBGSegments );
} }
+1 -2
View File
@@ -267,6 +267,5 @@ static int CompareCoursePointersByDifficulty(const Course* pCourse1, const Cours
void SortCoursePointerArrayByDifficulty( CArray<Course*,Course*> &apCourses ) void SortCoursePointerArrayByDifficulty( CArray<Course*,Course*> &apCourses )
{ {
sort( apCourses.GetData(), apCourses.GetData()+apCourses.GetSize(), sort( apCourses.begin(), apCourses.end(), CompareCoursePointersByDifficulty );
CompareCoursePointersByDifficulty );
} }
+1 -2
View File
@@ -211,7 +211,6 @@ bool CompareNotesPointersByDifficulty(const Notes *pNotes1, const Notes *pNotes2
void SortNotesArrayByDifficulty( CArray<Notes*,Notes*> &arraySteps ) void SortNotesArrayByDifficulty( CArray<Notes*,Notes*> &arraySteps )
{ {
sort( arraySteps.GetData(), arraySteps.GetData()+arraySteps.GetSize(), sort( arraySteps.begin(), arraySteps.end(), CompareNotesPointersByDifficulty );
CompareNotesPointersByDifficulty );
} }
+1 -2
View File
@@ -685,8 +685,7 @@ bool CompareCStringsDesc(const CString &str1, const CString &str2)
void SortCStringArray( CStringArray &arrayCStrings, const bool bSortAscending ) void SortCStringArray( CStringArray &arrayCStrings, const bool bSortAscending )
{ {
sort( arrayCStrings.GetData(), sort( arrayCStrings.begin(), arrayCStrings.end(),
arrayCStrings.GetData()+arrayCStrings.GetSize(),
bSortAscending?CompareCStringsAsc:CompareCStringsDesc); bSortAscending?CompareCStringsAsc:CompareCStringsDesc);
} }
+9 -24
View File
@@ -43,8 +43,7 @@ static int CompareBPMSegments(const BPMSegment &seg1, const BPMSegment &seg2)
void SortBPMSegmentsArray( CArray<BPMSegment,BPMSegment&> &arrayBPMSegments ) void SortBPMSegmentsArray( CArray<BPMSegment,BPMSegment&> &arrayBPMSegments )
{ {
sort( arrayBPMSegments.GetData(), sort( arrayBPMSegments.begin(), arrayBPMSegments.end(), CompareBPMSegments );
arrayBPMSegments.GetData()+arrayBPMSegments.GetSize(), CompareBPMSegments );
} }
static int CompareStopSegments(const StopSegment &seg1, const StopSegment &seg2) static int CompareStopSegments(const StopSegment &seg1, const StopSegment &seg2)
@@ -54,8 +53,7 @@ static int CompareStopSegments(const StopSegment &seg1, const StopSegment &seg2)
void SortStopSegmentsArray( CArray<StopSegment,StopSegment&> &arrayStopSegments ) void SortStopSegmentsArray( CArray<StopSegment,StopSegment&> &arrayStopSegments )
{ {
sort( arrayStopSegments.GetData(), sort( arrayStopSegments.begin(), arrayStopSegments.end(), CompareStopSegments );
arrayStopSegments.GetData()+arrayStopSegments.GetSize(), CompareStopSegments );
} }
int CompareBackgroundChanges(const BackgroundChange &seg1, const BackgroundChange &seg2) int CompareBackgroundChanges(const BackgroundChange &seg1, const BackgroundChange &seg2)
@@ -65,8 +63,7 @@ int CompareBackgroundChanges(const BackgroundChange &seg1, const BackgroundChang
void SortBackgroundChangesArray( CArray<BackgroundChange,BackgroundChange&> &arrayBackgroundChanges ) void SortBackgroundChangesArray( CArray<BackgroundChange,BackgroundChange&> &arrayBackgroundChanges )
{ {
sort( arrayBackgroundChanges.GetData(), sort( arrayBackgroundChanges.begin(), arrayBackgroundChanges.end(), CompareBackgroundChanges );
arrayBackgroundChanges.GetData()+arrayBackgroundChanges.GetSize(), CompareBackgroundChanges );
} }
@@ -891,9 +888,7 @@ int CompareSongPointersByTitle(const Song *pSong1, const Song *pSong2)
void SortSongPointerArrayByTitle( CArray<Song*, Song*> &arraySongPointers ) void SortSongPointerArrayByTitle( CArray<Song*, Song*> &arraySongPointers )
{ {
sort( arraySongPointers.GetData(), sort( arraySongPointers.begin(), arraySongPointers.end(), CompareSongPointersByTitle );
arraySongPointers.GetData()+arraySongPointers.GetSize(),
CompareSongPointersByTitle );
} }
int CompareSongPointersByDifficulty(const Song *pSong1, const Song *pSong2) int CompareSongPointersByDifficulty(const Song *pSong1, const Song *pSong2)
@@ -922,9 +917,7 @@ int CompareSongPointersByDifficulty(const Song *pSong1, const Song *pSong2)
void SortSongPointerArrayByDifficulty( CArray<Song*, Song*> &arraySongPointers ) void SortSongPointerArrayByDifficulty( CArray<Song*, Song*> &arraySongPointers )
{ {
sort( arraySongPointers.GetData(), sort( arraySongPointers.begin(), arraySongPointers.end(), CompareSongPointersByDifficulty );
arraySongPointers.GetData()+arraySongPointers.GetSize(),
CompareSongPointersByDifficulty );
} }
bool CompareSongPointersByBPM(const Song *pSong1, const Song *pSong2) bool CompareSongPointersByBPM(const Song *pSong1, const Song *pSong2)
@@ -943,9 +936,7 @@ bool CompareSongPointersByBPM(const Song *pSong1, const Song *pSong2)
void SortSongPointerArrayByBPM( CArray<Song*, Song*> &arraySongPointers ) void SortSongPointerArrayByBPM( CArray<Song*, Song*> &arraySongPointers )
{ {
sort( arraySongPointers.GetData(), sort( arraySongPointers.begin(), arraySongPointers.end(), CompareSongPointersByBPM );
arraySongPointers.GetData()+arraySongPointers.GetSize(),
CompareSongPointersByBPM );
} }
@@ -963,9 +954,7 @@ int CompareSongPointersByArtist(const Song *pSong1, const Song *pSong2)
void SortSongPointerArrayByArtist( CArray<Song*, Song*> &arraySongPointers ) void SortSongPointerArrayByArtist( CArray<Song*, Song*> &arraySongPointers )
{ {
sort( arraySongPointers.GetData(), sort( arraySongPointers.begin(), arraySongPointers.end(), CompareSongPointersByArtist );
arraySongPointers.GetData()+arraySongPointers.GetSize(),
CompareSongPointersByArtist );
} }
int CompareSongPointersByGroup(const Song *pSong1, const Song *pSong2) int CompareSongPointersByGroup(const Song *pSong1, const Song *pSong2)
@@ -984,9 +973,7 @@ int CompareSongPointersByGroup(const Song *pSong1, const Song *pSong2)
void SortSongPointerArrayByGroup( CArray<Song*, Song*> &arraySongPointers ) void SortSongPointerArrayByGroup( CArray<Song*, Song*> &arraySongPointers )
{ {
sort( arraySongPointers.GetData(), sort( arraySongPointers.begin(), arraySongPointers.end(), CompareSongPointersByGroup );
arraySongPointers.GetData()+arraySongPointers.GetSize(),
CompareSongPointersByGroup );
} }
int CompareSongPointersByMostPlayed(const Song *pSong1, const Song *pSong2) int CompareSongPointersByMostPlayed(const Song *pSong1, const Song *pSong2)
@@ -1003,9 +990,7 @@ int CompareSongPointersByMostPlayed(const Song *pSong1, const Song *pSong2)
void SortSongPointerArrayByMostPlayed( CArray<Song*, Song*> &arraySongPointers ) void SortSongPointerArrayByMostPlayed( CArray<Song*, Song*> &arraySongPointers )
{ {
sort( arraySongPointers.GetData(), sort( arraySongPointers.begin(), arraySongPointers.end(), CompareSongPointersByMostPlayed );
arraySongPointers.GetData()+arraySongPointers.GetSize(),
CompareSongPointersByMostPlayed );
} }
bool Song::NormallyDisplayed() const bool Song::NormallyDisplayed() const