diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/glk/quest/geas_file.cpp | 18 | ||||
-rw-r--r-- | engines/glk/quest/geas_state.h | 2 | ||||
-rw-r--r-- | engines/glk/quest/limit_stack.h | 2 | ||||
-rw-r--r-- | engines/glk/quest/read_file.cpp | 4 |
4 files changed, 13 insertions, 13 deletions
diff --git a/engines/glk/quest/geas_file.cpp b/engines/glk/quest/geas_file.cpp index 187c7cc101..c31b4d5a61 100644 --- a/engines/glk/quest/geas_file.cpp +++ b/engines/glk/quest/geas_file.cpp @@ -231,14 +231,14 @@ bool GeasFile::get_obj_property(String objname, String propname, String &string_ } String objtype = (*obj_types.find(objname))._value; - const GeasBlock *block = find_by_name(objtype, objname); + const GeasBlock *geasBlock = find_by_name(objtype, objname); String not_prop = "not " + propname; uint c1, c2; - assert(block != NULL); - //assert (block->data != NULL); - for (uint i = 0; i < block->data.size(); i ++) { - String line = block->data[i]; + assert(geasBlock != NULL); + //assert (geasBlock->data != NULL); + for (uint i = 0; i < geasBlock->data.size(); i ++) { + String line = geasBlock->data[i]; //cerr << " g_o_p: Handling line <" << line << ">\n"; String tok = first_token(line, c1, c2); // SENSITIVE? @@ -481,13 +481,13 @@ bool GeasFile::get_obj_action(String objname, String propname, String &string_rv void GeasFile::get_type_action(String typenamex, String actname, bool &bool_rv, String &string_rv) const { //cerr << " Checking type <" << typenamex << "> for action <" << actname << ">\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 << " g_t_a: Comparing vs. line <" << line << ">\n"; uint c1, c2; String tok = first_token(line, c1, c2); diff --git a/engines/glk/quest/geas_state.h b/engines/glk/quest/geas_state.h index 70365f1fd8..647ee45c8a 100644 --- a/engines/glk/quest/geas_state.h +++ b/engines/glk/quest/geas_state.h @@ -138,7 +138,7 @@ public: //void register_block (String blockname, String blocktype); - GeasState() {} + GeasState() : running(false) {} //GeasState (GeasRunner &, const GeasFile &); GeasState(GeasInterface &, const GeasFile &); /* diff --git a/engines/glk/quest/limit_stack.h b/engines/glk/quest/limit_stack.h index 75cad4401d..35ea93dfe9 100644 --- a/engines/glk/quest/limit_stack.h +++ b/engines/glk/quest/limit_stack.h @@ -54,7 +54,7 @@ template <class T> class LimitStack { */ public: - LimitStack(uint size) : stack_size(size), cur_ptr(0), end_ptr(size - 1), data(Common::Array<T> (size)) { } + LimitStack(uint maxSize) : stack_size(maxSize), cur_ptr(0), end_ptr(maxSize - 1), data(Common::Array<T> (maxSize)) { } void push(T &item) { if (cur_ptr == end_ptr) diff --git a/engines/glk/quest/read_file.cpp b/engines/glk/quest/read_file.cpp index af6cc9d496..cc3fdd1aee 100644 --- a/engines/glk/quest/read_file.cpp +++ b/engines/glk/quest/read_file.cpp @@ -641,7 +641,7 @@ String trim(String s, trim_modes trim_mode) { * - Otherwise, it's unbalanced */ bool is_balanced(String str) { - uint index = str.find('{'); + int index = str.find('{'); if (index == -1) return true; int depth; @@ -655,7 +655,7 @@ bool is_balanced(String str) { int count_depth(String str, int count) { //cerr << "count_depth (" << str << ", " << count << ")" << endl; - uint index = 0; + int index = 0; if (count == 0) index = str.find('{'); while (index < str.size()) { |