[Scummvm-cvs-logs] SF.net SVN: scummvm:[54868] scummvm/trunk/common/config-file.cpp

fuzzie at users.sourceforge.net fuzzie at users.sourceforge.net
Sat Dec 11 20:53:13 CET 2010


Revision: 54868
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54868&view=rev
Author:   fuzzie
Date:     2010-12-11 19:53:11 +0000 (Sat, 11 Dec 2010)

Log Message:
-----------
COMMON: Handle C++-style comments in config files

Modified Paths:
--------------
    scummvm/trunk/common/config-file.cpp

Modified: scummvm/trunk/common/config-file.cpp
===================================================================
--- scummvm/trunk/common/config-file.cpp	2010-12-11 18:38:27 UTC (rev 54867)
+++ scummvm/trunk/common/config-file.cpp	2010-12-11 19:53:11 UTC (rev 54868)
@@ -95,11 +95,11 @@
 
 		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] == '(') {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list