diff --git a/stepmania/src/Song.cpp b/stepmania/src/Song.cpp index d1b13b52a0..5463c62049 100644 --- a/stepmania/src/Song.cpp +++ b/stepmania/src/Song.cpp @@ -1041,6 +1041,22 @@ CString Song::GetBackgroundPath() const return m_sSongDir+m_sBackgroundFile; } +CString Song::GetSortTitle() const +{ + CString Title = m_sMainTitleTranslit.empty()? + m_sMainTitle: m_sMainTitleTranslit; + + CString SubTitle = m_sSubTitleTranslit.empty()? + m_sSubTitle:m_sSubTitleTranslit; + + if(!SubTitle.empty()) + { + Title += " " + SubTitle; + } + + return Title; +} + /* Get the first/last beat of any currently active note pattern. If two * players are active, they often have the same start beat, but they don't * have to. diff --git a/stepmania/src/song.h b/stepmania/src/song.h index a22d678827..8c88bf5414 100644 --- a/stepmania/src/song.h +++ b/stepmania/src/song.h @@ -101,17 +101,7 @@ public: CString m_sCredit; CString GetFullTitle() const { return m_sMainTitle + (m_sSubTitle.GetLength()? (" " + m_sSubTitle):""); } - CString GetSortTitle() const { return - (m_sMainTitleTranslit.empty()? - m_sMainTitle: - m_sMainTitleTranslit) - + - (m_sSubTitleTranslit.empty()? - (m_sSubTitle.empty()? - "": - " " + m_sSubTitle): - " " + m_sSubTitleTranslit); - } + CString GetSortTitle() const; CString m_sMusicFile; unsigned m_iMusicBytes;