From 813dd2b127c7725522434591e35c9d57a1d8594a Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 22 Mar 2005 23:04:03 +0000 Subject: [PATCH] minor optimizations --- stepmania/src/IniFile.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/stepmania/src/IniFile.cpp b/stepmania/src/IniFile.cpp index e671b316f9..81a9494913 100644 --- a/stepmania/src/IniFile.cpp +++ b/stepmania/src/IniFile.cpp @@ -43,10 +43,11 @@ bool IniFile::ReadFile( RageFileBasic &f ) utf8_remove_bom( line ); - if( line == "" ) + if( line.size() == 0 ) continue; - - if( line.substr(0, 2) == "//" || line.substr(0) == "#" ) + if( line[0] == '#' ) + continue; /* comment */ + if( line.size() > 1 && line[0] == '/' && line[1] == '/' ) continue; /* comment */ if( line[0] == '[' && line[line.GetLength()-1] == ']' )