diff options
author | Alyssa Milburn | 2010-12-11 19:53:11 +0000 |
---|---|---|
committer | Alyssa Milburn | 2010-12-11 19:53:11 +0000 |
commit | bcea996361b8cea2c05b7dd7c3f9006fa09656bf (patch) | |
tree | 6616efe7053a6f5d03c2f160014538861c417672 /common | |
parent | b1e3b48418e2514893768ecf8a6ba0db61b9302e (diff) | |
download | scummvm-rg350-bcea996361b8cea2c05b7dd7c3f9006fa09656bf.tar.gz scummvm-rg350-bcea996361b8cea2c05b7dd7c3f9006fa09656bf.tar.bz2 scummvm-rg350-bcea996361b8cea2c05b7dd7c3f9006fa09656bf.zip |
COMMON: Handle C++-style comments in config files
svn-id: r54868
Diffstat (limited to 'common')
-rw-r--r-- | common/config-file.cpp | 6 |
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] == '(') { |