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

@@ -112,18 +112,18 @@ int main(int argc, const char *argv[]) {
std::vector<std::string> filenames;
std::vector<const char *> include_directories;
size_t binary_files_from = std::numeric_limits<size_t>::max();
for (int i = 1; i < argc; i++) {
const char *arg = argv[i];
for (int argi = 1; argi < argc; argi++) {
const char *arg = argv[argi];
if (arg[0] == '-') {
if (filenames.size() && arg[1] != '-')
Error("invalid option location", arg, true);
std::string opt = arg;
if (opt == "-o") {
if (++i >= argc) Error("missing path following", arg, true);
output_path = flatbuffers::ConCatPathFileName(argv[i], "");
if (++argi >= argc) Error("missing path following", arg, true);
output_path = flatbuffers::ConCatPathFileName(argv[argi], "");
} else if(opt == "-I") {
if (++i >= argc) Error("missing path following", arg, true);
include_directories.push_back(argv[i]);
if (++argi >= argc) Error("missing path following", arg, true);
include_directories.push_back(argv[argi]);
} else if(opt == "--strict-json") {
opts.strict_json = true;
} else if(opt == "--no-prefix") {
@@ -149,7 +149,7 @@ int main(int argc, const char *argv[]) {
found:;
}
} else {
filenames.push_back(argv[i]);
filenames.push_back(argv[argi]);
}
}