Fix minor windows pedantic warnings.

This commit is contained in:
Jason Felds
2016-03-27 22:03:15 -04:00
parent 534909d30a
commit bec18a0d36
31 changed files with 173 additions and 67 deletions
+7 -2
View File
@@ -32,12 +32,14 @@ bool LyricsLoader::LoadFromLRCFile(const RString& sPath, Song& out)
out.m_LyricSegments.clear();
while( 1 )
for(;;)
{
RString line;
int ret = input.GetLine( line );
if( ret == 0 )
{
break;
}
if( ret == -1 )
{
LuaHelpers::ReportScriptErrorFmt("Error reading %s: %s", input.GetPath().c_str(), input.GetError().c_str() );
@@ -47,15 +49,18 @@ bool LyricsLoader::LoadFromLRCFile(const RString& sPath, Song& out)
utf8_remove_bom( line );
if(!line.compare(0, 2, "//"))
{
continue;
}
// (most tags are in the format of...)
// "[data1] data2". Ignore whitespace at the beginning of the line.
static Regex x("^ *\\[([^]]+)\\] *(.*)$");
vector<RString> matches;
if(!x.Compare(line, matches))
{
continue;
}
ASSERT( matches.size() == 2 );
RString &sValueName = matches[0];