Created
April 6, 2015 20:16
-
-
Save rwcarlsen/5fdc217462465d15981d to your computer and use it in GitHub Desktop.
fix cycpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/cli/cycpp.py b/cli/cycpp.py | |
| index ddad106..d966876 100755 | |
| --- a/cli/cycpp.py | |
| +++ b/cli/cycpp.py | |
| @@ -1260,7 +1260,7 @@ class InfileToDbFilter(CodeGeneratorFilter): | |
| s += ind + 'int n = sub->NMatches("{0}");\n'.format(alias[1]) | |
| s += ind + '{0} {1};\n'.format(type_to_str(t), member) | |
| s += ind + '{0}.resize(n);\n'.format(member) | |
| - s += ind + 'for (i = 0; i < n; ++i) {\n' | |
| + s += ind + 'for (int i = 0; i < n; ++i) {\n' | |
| s += self.read_member('elem', alias[1], t[1], uitype[1], ind+' ', idx='i') | |
| s += ind + ' {0}[i] = elem;\n'.format(member) | |
| s += ind + '}\n' | |
| @@ -1278,7 +1278,7 @@ class InfileToDbFilter(CodeGeneratorFilter): | |
| s += ind + '{0}::InfileTree* sub = bub;\n'.format(CYCNS) | |
| s += ind + 'int n = sub->NMatches("{0}");\n'.format(alias[1]) | |
| s += ind + '{0} {1};\n'.format(type_to_str(t), member) | |
| - s += ind + 'for (i = 0; i < n; ++i) {\n' | |
| + s += ind + 'for (int i = 0; i < n; ++i) {\n' | |
| s += self.read_member('elem', alias[1], t[1], uitype[1], ind+' ', idx='i') | |
| s += ind + ' {0}.insert(elem);\n'.format(member) | |
| s += ind + '}\n' | |
| @@ -1296,7 +1296,7 @@ class InfileToDbFilter(CodeGeneratorFilter): | |
| s += ind + '{0}::InfileTree* sub = bub;\n'.format(CYCNS) | |
| s += ind + 'int n = sub->NMatches("{0}");\n'.format(alias[1]) | |
| s += ind + '{0} {1};\n'.format(type_to_str(t), member) | |
| - s += ind + 'for (i = 0; i < n; ++i) {\n' | |
| + s += ind + 'for (int i = 0; i < n; ++i) {\n' | |
| s += self.read_member('elem', alias[1], t[1], uitype[1], ind+' ', idx='i') | |
| s += ind + ' {0}.push_back(elem);\n'.format(member) | |
| s += ind + '}\n' | |
| @@ -1333,7 +1333,7 @@ class InfileToDbFilter(CodeGeneratorFilter): | |
| s += ind + '{0}::InfileTree* sub = bub;\n'.format(CYCNS) | |
| s += ind + 'int n = sub->NMatches("{0}");\n'.format(alias[1]) | |
| s += ind + '{0} {1};\n'.format(type_to_str(t), member) | |
| - s += ind + 'for (i = 0; i < n; ++i) {\n' | |
| + s += ind + 'for (int i = 0; i < n; ++i) {\n' | |
| s += self.read_member('key', alias[1], t[1], uitype[1], ind+' ', idx='i') | |
| s += self.read_member('val', alias[2], t[2], uitype[2], ind+' ', idx='i') | |
| s += ind + ' {0}[key] = val;\n'.format(member) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment