Remove unneeded code; add an assert.
This commit is contained in:
@@ -45,6 +45,7 @@ bool LyricsLoader::LoadFromLRCFile( CString sPath, Song &out )
|
|||||||
vector<CString> matches;
|
vector<CString> matches;
|
||||||
if(!x.Compare(line, matches))
|
if(!x.Compare(line, matches))
|
||||||
continue;
|
continue;
|
||||||
|
ASSERT( matches.size() == 2 );
|
||||||
|
|
||||||
CString &sValueName = matches[0];
|
CString &sValueName = matches[0];
|
||||||
CString &sValueData = matches[1];
|
CString &sValueData = matches[1];
|
||||||
@@ -76,12 +77,6 @@ bool LyricsLoader::LoadFromLRCFile( CString sPath, Song &out )
|
|||||||
seg.m_fStartTime = TimeToSeconds(sValueName);
|
seg.m_fStartTime = TimeToSeconds(sValueName);
|
||||||
seg.m_sLyric = sValueData;
|
seg.m_sLyric = sValueData;
|
||||||
|
|
||||||
/* Er, huh? This won't do anything (replace \ with \). What's wrong
|
|
||||||
* with using \ in lyrics? */
|
|
||||||
seg.m_sLyric.Replace( "\\", "\\" ); // to avoid possible screw-ups
|
|
||||||
// if someone uses a \ for whatever
|
|
||||||
// reason in their lyrics -- Miryokuteki
|
|
||||||
|
|
||||||
seg.m_sLyric.Replace( "|","\n" ); // Pipe symbols denote a new line in LRC files
|
seg.m_sLyric.Replace( "|","\n" ); // Pipe symbols denote a new line in LRC files
|
||||||
out.AddLyricSegment( seg );
|
out.AddLyricSegment( seg );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user