From 4322e76cb6de6759bd7d31d382fe1cb602666e13 Mon Sep 17 00:00:00 2001 From: scrawl Date: Mon, 29 Aug 2016 12:38:24 +0200 Subject: [PATCH] Fix shadowing warnings --- components/fontloader/fontloader.cpp | 4 ++-- components/interpreter/defines.cpp | 2 +- components/terrain/buffercache.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/fontloader/fontloader.cpp b/components/fontloader/fontloader.cpp index b66fbbb20..aa92a01c6 100644 --- a/components/fontloader/fontloader.cpp +++ b/components/fontloader/fontloader.cpp @@ -58,7 +58,7 @@ namespace } for (size_t j = 0; j < numbytes; ++j) { - unsigned char ch = utf8[i++]; + ch = utf8[i++]; if (ch < 0x80 || ch > 0xBF) throw std::logic_error("not a UTF-8 string"); unicode <<= 6; @@ -374,7 +374,7 @@ namespace Gui if (it->first != i) continue; - MyGUI::xml::ElementPtr code = codes->createChild("Code"); + code = codes->createChild("Code"); code->addAttribute("index", it->second); code->addAttribute("coord", MyGUI::utility::toString(x1) + " " + MyGUI::utility::toString(y1) + " " diff --git a/components/interpreter/defines.cpp b/components/interpreter/defines.cpp index fafaf1fef..912a5e1d9 100644 --- a/components/interpreter/defines.cpp +++ b/components/interpreter/defines.cpp @@ -172,7 +172,7 @@ namespace Interpreter{ for(unsigned int j = 0; j < globals.size(); j++){ if(globals[j].length() > temp.length()){ // Just in case there's a global with a huuuge name - std::string temp = text.substr(i+1, globals[j].length()); + temp = text.substr(i+1, globals[j].length()); transform(temp.begin(), temp.end(), temp.begin(), ::tolower); } diff --git a/components/terrain/buffercache.cpp b/components/terrain/buffercache.cpp index a72dac026..40ca1efca 100644 --- a/components/terrain/buffercache.cpp +++ b/components/terrain/buffercache.cpp @@ -124,7 +124,7 @@ osg::ref_ptr createIndexBuffer(unsigned int flags, unsigned int // West size_t col = 0; outerStep = size_t(1) << (lodDeltas[Terrain::West] + lodLevel); - for (size_t row = 0; row < verts-1; row += outerStep) + for (row = 0; row < verts-1; row += outerStep) { indices->push_back(verts*col+row+outerStep); indices->push_back(verts*col+row); @@ -148,7 +148,7 @@ osg::ref_ptr createIndexBuffer(unsigned int flags, unsigned int // East col = verts-1; outerStep = size_t(1) << (lodDeltas[Terrain::East] + lodLevel); - for (size_t row = 0; row < verts-1; row += outerStep) + for (row = 0; row < verts-1; row += outerStep) { indices->push_back(verts*col+row); indices->push_back(verts*col+row+outerStep);