aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlyssa Milburn2010-12-11 19:53:11 +0000
committerAlyssa Milburn2010-12-11 19:53:11 +0000
commitbcea996361b8cea2c05b7dd7c3f9006fa09656bf (patch)
tree6616efe7053a6f5d03c2f160014538861c417672
parentb1e3b48418e2514893768ecf8a6ba0db61b9302e (diff)
downloadscummvm-rg350-bcea996361b8cea2c05b7dd7c3f9006fa09656bf.tar.gz
scummvm-rg350-bcea996361b8cea2c05b7dd7c3f9006fa09656bf.tar.bz2
scummvm-rg350-bcea996361b8cea2c05b7dd7c3f9006fa09656bf.zip
COMMON: Handle C++-style comments in config files
svn-id: r54868
-rw-r--r--common/config-file.cpp6
1 files 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] == '(') {