From 217ce59155caee482d8f5d7a43c6400a07c4bd5c Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 9 Jan 2003 09:01:20 +0000 Subject: [PATCH] pull this out of the header --- stepmania/src/Song.cpp | 16 ++++++++++++++++ stepmania/src/song.h | 12 +----------- 2 files changed, 17 insertions(+), 11 deletions(-) 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;