move this function out of the header

This commit is contained in:
Glenn Maynard
2002-12-30 21:57:54 +00:00
parent 76af3c3436
commit 4cee9ed975
2 changed files with 34 additions and 35 deletions
+33
View File
@@ -1229,3 +1229,36 @@ void MusicWheel::TweenOffScreen()
}
CString MusicWheel::GetSectionNameFromSongAndSort( Song* pSong, SongSortOrder so )
{
if( pSong == NULL )
return "";
CString sTemp;
switch( so )
{
case SORT_GROUP:
sTemp = pSong->m_sGroupName;
return sTemp;
// case SORT_ARTIST:
// sTemp = pSong->m_sArtist;
// sTemp.MakeUpper();
// sTemp = (sTemp.GetLength() > 0) ? sTemp.Left(1) : "";
// if( IsAnInt(sTemp) )
// sTemp = "NUM";
// return sTemp;
case SORT_TITLE:
sTemp = pSong->GetSortTitle();
sTemp.MakeUpper();
sTemp = (sTemp.GetLength() > 0) ? sTemp.Left(1) : "";
if( IsAnInt(sTemp) )
sTemp = "NUM";
return sTemp;
case SORT_BPM:
case SORT_MOST_PLAYED:
default:
return "";
}
}
+1 -35
View File
@@ -164,41 +164,7 @@ protected:
RageSoundSample m_soundStart;
RageSoundSample m_soundLocked;
CString GetSectionNameFromSongAndSort( Song* pSong, SongSortOrder so )
{
if( pSong == NULL )
return "";
CString sTemp;
switch( so )
{
case SORT_GROUP:
sTemp = pSong->m_sGroupName;
return sTemp;
// case SORT_ARTIST:
// sTemp = pSong->m_sArtist;
// sTemp.MakeUpper();
// sTemp = (sTemp.GetLength() > 0) ? sTemp.Left(1) : "";
// if( IsAnInt(sTemp) )
// sTemp = "NUM";
// return sTemp;
case SORT_TITLE:
sTemp = pSong->GetSortTitle();
sTemp.MakeUpper();
sTemp = (sTemp.GetLength() > 0) ? sTemp.Left(1) : "";
if( IsAnInt(sTemp) )
sTemp = "NUM";
return sTemp;
case SORT_BPM:
case SORT_MOST_PLAYED:
default:
return "";
}
};
CString GetSectionNameFromSongAndSort( Song* pSong, SongSortOrder so );
};
#endif