Remove the __APPLE__ workaround for reading config files from a ctor.

'#' is a fairly accepted comment character for .ini files along with
the more official ';', but '//' isn't.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6872 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang
2011-01-18 00:04:29 +00:00
parent d0805aef37
commit 1a3cd2d34c
14 changed files with 30 additions and 79 deletions

View File

@ -32,13 +32,16 @@ namespace {
static void ParseLine(const std::string& line, std::string* keyOut, std::string* valueOut, std::string* commentOut)
{
//
int FirstEquals = (int)line.find("=", 0);
int FirstCommentChar = -1;
// Comments
//if (FirstCommentChar < 0) {FirstCommentChar = (int)line.find(";", FirstEquals > 0 ? FirstEquals : 0);}
if (FirstCommentChar < 0) {FirstCommentChar = (int)line.find("#", FirstEquals > 0 ? FirstEquals : 0);}
if (FirstCommentChar < 0) {FirstCommentChar = (int)line.find("//", FirstEquals > 0 ? FirstEquals : 0);}
if (FirstCommentChar < 0)
FirstCommentChar =
(int)line.find(";", FirstEquals > 0 ? FirstEquals : 0);
if (FirstCommentChar < 0)
FirstCommentChar =
(int)line.find("#", FirstEquals > 0 ? FirstEquals : 0);
// Allow preservation of spacing before comment
if (FirstCommentChar > 0)