[Scummvm-git-logs] scummvm master -> c10267d83b01cc8e42973c41fb365131a316b68b

dreammaster paulfgilbert at gmail.com
Mon Sep 30 03:13:59 CEST 2019


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
c10267d83b GLK: QUEST: More warning fixes


Commit: c10267d83b01cc8e42973c41fb365131a316b68b
    https://github.com/scummvm/scummvm/commit/c10267d83b01cc8e42973c41fb365131a316b68b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2019-09-29T18:13:44-07:00

Commit Message:
GLK: QUEST: More warning fixes

Changed paths:
    engines/glk/quest/geas_file.cpp
    engines/glk/quest/read_file.cpp


diff --git a/engines/glk/quest/geas_file.cpp b/engines/glk/quest/geas_file.cpp
index c31b4d5..5bd0d55 100644
--- a/engines/glk/quest/geas_file.cpp
+++ b/engines/glk/quest/geas_file.cpp
@@ -285,13 +285,13 @@ bool GeasFile::get_obj_property(String objname, String propname, String &string_
 
 void GeasFile::get_type_property(String typenamex, String propname, bool &bool_rv, String &string_rv) const {
 	//cerr << "  Checking type <" << typenamex << "> for prop <" << propname << ">\n";
-	const GeasBlock *block = find_by_name("type", typenamex);
-	if (block == NULL) {
+	const GeasBlock *geasBlock = find_by_name("type", typenamex);
+	if (geasBlock == NULL) {
 		debug_print("Object of nonexistent type " + typenamex);
 		return;
 	}
-	for (uint i = 0; i < block->data.size(); i ++) {
-		String line = block->data[i];
+	for (uint i = 0; i < geasBlock->data.size(); i ++) {
+		String line = geasBlock->data[i];
 		//cerr << "    Comparing vs. line <" << line << ">\n";
 		uint c1, c2;
 		int p;
@@ -358,12 +358,12 @@ bool GeasFile::obj_of_type(String objname, String typenamex) const {
 	}
 	String objtype = (*obj_types.find(objname))._value;
 
-	const GeasBlock *block = find_by_name(objtype, objname);
+	const GeasBlock *geasBlock = find_by_name(objtype, objname);
 
 	uint c1, c2;
-	assert(block != NULL);
-	for (uint i = 0; i < block->data.size(); i ++) {
-		String line = block->data[i];
+	assert(geasBlock != NULL);
+	for (uint i = 0; i < geasBlock->data.size(); i ++) {
+		String line = geasBlock->data[i];
 		String tok = first_token(line, c1, c2);
 		// SENSITIVE?
 		if (tok == "type") {
@@ -384,13 +384,13 @@ bool GeasFile::type_of_type(String subtype, String supertype) const {
 	if (ci_equal(subtype, supertype))
 		return true;
 	//cerr << "  Checking type <" << subtype << "> for type <" << supertype << ">\n";
-	const GeasBlock *block = find_by_name("type", subtype);
-	if (block == NULL) {
+	const GeasBlock *geasBlock = find_by_name("type", subtype);
+	if (geasBlock == NULL) {
 		debug_print("t_o_t: Nonexistent type " + subtype);
 		return false;
 	}
-	for (uint i = 0; i < block->data.size(); i ++) {
-		String line = block->data[i];
+	for (uint i = 0; i < geasBlock->data.size(); i ++) {
+		String line = geasBlock->data[i];
 		//cerr << "    Comparing vs. line <" << line << ">\n";
 		uint c1, c2;
 		String tok = first_token(line, c1, c2);
@@ -427,11 +427,11 @@ bool GeasFile::get_obj_action(String objname, String propname, String &string_rv
 
 	//reserved_words *rw;
 
-	const GeasBlock *block = find_by_name(objtype, objname);
+	const GeasBlock *geasBlock = find_by_name(objtype, objname);
 	String not_prop = "not " + propname;
 	uint c1, c2;
-	for (uint i = 0; i < block->data.size(); i ++) {
-		String line = block->data[i];
+	for (uint i = 0; i < geasBlock->data.size(); i ++) {
+		String line = geasBlock->data[i];
 		//cerr << "  g_o_a: Handling line <" << line << ">\n";
 		String tok = first_token(line, c1, c2);
 		// SENSITIVE?
diff --git a/engines/glk/quest/read_file.cpp b/engines/glk/quest/read_file.cpp
index cc3fdd1..fb93015 100644
--- a/engines/glk/quest/read_file.cpp
+++ b/engines/glk/quest/read_file.cpp
@@ -645,7 +645,7 @@ bool is_balanced(String str) {
 	if (index == -1)
 		return true;
 	int depth;
-	for (depth = 1, index ++;  depth > 0 && index < str.size();  index ++)
+	for (depth = 1, index ++;  depth > 0 && index < (int)str.size();  index ++)
 		if (str[index] == '{')
 			++ depth;
 		else if (str[index] == '}')
@@ -658,7 +658,7 @@ int count_depth(String str, int count) {
 	int index = 0;
 	if (count == 0)
 		index = str.find('{');
-	while (index < str.size()) {
+	while (index < (int)str.size()) {
 		if (str[index] == '{')
 			++ count;
 		else if (str[index] == '}')





More information about the Scummvm-git-logs mailing list