From bcea996361b8cea2c05b7dd7c3f9006fa09656bf Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Sat, 11 Dec 2010 19:53:11 +0000 Subject: COMMON: Handle C++-style comments in config files svn-id: r54868 --- common/config-file.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/config-file.cpp b/common/config-file.cpp index d001a66c9e..878d29301f 100644 --- a/common/config-file.cpp +++ b/common/config-file.cpp @@ -95,11 +95,11 @@ bool ConfigFile::loadFromStream(SeekableReadStream &stream) { if (line.size() == 0) { // Do nothing - } else if (line[0] == '#' || line[0] == ';') { + } else if (line[0] == '#' || line[0] == ';' || line.hasPrefix("//")) { // Accumulate comments here. Once we encounter either the start // of a new section, or a key-value-pair, we associate the value - // of the 'comment' variable with that entity. The semicolon - // comment is used for Living Books games in Mohawk. + // of the 'comment' variable with that entity. The semicolon and + // C++-style comments are used for Living Books games in Mohawk. comment += line; comment += "\n"; } else if (line[0] == '(') { -- cgit v1.2.3