Fix for VS 2015 stricter warnings about "shadowed" names.

This change renames a few variables to fix the build in VS 2015.

VS 2015 new warnings:
http://blogs.msdn.com/b/vcblog/archive/2014/11/12/improvements-to-warnings-in-the-c-compiler.aspx

Change-Id: Ic9c3f75ee717f0125960c813df442ed4fbcceb4a
This commit is contained in:
Max Galkin
2015-03-07 08:49:55 -08:00
committed by Wouter van Oortmerssen
parent a360958be3
commit c3807fa39d
3 changed files with 29 additions and 29 deletions

View File

@@ -58,9 +58,9 @@ std::string GenerateFBS(const Parser &parser, const std::string &file_name,
}
schema += ";\n\n";
// Generate code for all the enum declarations.
for (auto it = parser.enums_.vec.begin();
it != parser.enums_.vec.end(); ++it) {
EnumDef &enum_def = **it;
for (auto enum_def_it = parser.enums_.vec.begin();
enum_def_it != parser.enums_.vec.end(); ++enum_def_it) {
EnumDef &enum_def = **enum_def_it;
schema += "enum " + enum_def.name + " : ";
schema += GenType(enum_def.underlying_type) + " {\n";
for (auto it = enum_def.vals.vec.begin();
@@ -75,9 +75,9 @@ std::string GenerateFBS(const Parser &parser, const std::string &file_name,
it != parser.structs_.vec.end(); ++it) {
StructDef &struct_def = **it;
schema += "table " + struct_def.name + " {\n";
for (auto it = struct_def.fields.vec.begin();
it != struct_def.fields.vec.end(); ++it) {
auto &field = **it;
for (auto field_it = struct_def.fields.vec.begin();
field_it != struct_def.fields.vec.end(); ++field_it) {
auto &field = **field_it;
schema += " " + field.name + ":" + GenType(field.value.type);
if (field.value.constant != "0") schema += " = " + field.value.constant;
if (field.required) schema += " (required)";