diff --git a/components/compiler/scanner.cpp b/components/compiler/scanner.cpp index b370f74a1..720fde9f1 100644 --- a/components/compiler/scanner.cpp +++ b/components/compiler/scanner.cpp @@ -260,7 +260,7 @@ namespace Compiler return true; } - static const char *keywords[] = + static const char *sKeywords[] = { "begin", "end", "short", "long", "float", @@ -306,11 +306,11 @@ namespace Compiler std::string lowerCase = Misc::StringUtils::lowerCase(name); - for (; keywords[i]; ++i) - if (lowerCase==keywords[i]) + for (; sKeywords[i]; ++i) + if (lowerCase==sKeywords[i]) break; - if (keywords[i]) + if (sKeywords[i]) { cont = parser.parseKeyword (i, loc, *this); return true; @@ -618,8 +618,8 @@ namespace Compiler void Scanner::listKeywords (std::vector& keywords) { - for (int i=0; Compiler::keywords[i]; ++i) - keywords.push_back (Compiler::keywords[i]); + for (int i=0; Compiler::sKeywords[i]; ++i) + keywords.push_back (Compiler::sKeywords[i]); if (mExtensions) mExtensions->listKeywords (keywords); diff --git a/components/esm/inventorystate.cpp b/components/esm/inventorystate.cpp index b24128ec3..73db72b00 100644 --- a/components/esm/inventorystate.cpp +++ b/components/esm/inventorystate.cpp @@ -65,11 +65,11 @@ void ESM::InventoryState::load (ESMReader &esm) while (esm.isNextSub("EQUI")) { esm.getSubHeader(); - int index; - esm.getT(index); + int equipIndex; + esm.getT(equipIndex); int slot; esm.getT(slot); - mEquipmentSlots[index] = slot; + mEquipmentSlots[equipIndex] = slot; } mSelectedEnchantItem = -1; diff --git a/components/interpreter/interpreter.cpp b/components/interpreter/interpreter.cpp index 1892e4a6f..e77a0bb72 100644 --- a/components/interpreter/interpreter.cpp +++ b/components/interpreter/interpreter.cpp @@ -241,9 +241,9 @@ namespace Interpreter while (mRuntime.getPC()>=0 && mRuntime.getPC()recType == Nif::RC_NiUVController) { - const Nif::NiUVController *uvctrl = static_cast(ctrl.getPtr()); + const Nif::NiUVController *niuvctrl = static_cast(ctrl.getPtr()); std::set texUnits; for (unsigned int i=0; i ctrl = new UVController(uvctrl->data.getPtr(), texUnits); - setupController(uvctrl, ctrl, animflags); - composite->addController(ctrl); + osg::ref_ptr uvctrl = new UVController(niuvctrl->data.getPtr(), texUnits); + setupController(niuvctrl, uvctrl, animflags); + composite->addController(uvctrl); } else if (ctrl->recType == Nif::RC_NiVisController) { diff --git a/components/shader/shadervisitor.cpp b/components/shader/shadervisitor.cpp index dbba721c2..041b568df 100644 --- a/components/shader/shadervisitor.cpp +++ b/components/shader/shadervisitor.cpp @@ -154,11 +154,11 @@ namespace Shader if (mAutoUseNormalMaps && diffuseMap != NULL && normalMap == NULL) { - std::string normalMap = diffuseMap->getImage(0)->getFileName(); + std::string normalMapFileName = diffuseMap->getImage(0)->getFileName(); osg::ref_ptr image; bool normalHeight = false; - std::string normalHeightMap = normalMap; + std::string normalHeightMap = normalMapFileName; boost::replace_last(normalHeightMap, ".", mNormalHeightMapPattern + "."); if (mImageManager.getVFS()->exists(normalHeightMap)) { @@ -167,10 +167,10 @@ namespace Shader } else { - boost::replace_last(normalMap, ".", mNormalMapPattern + "."); - if (mImageManager.getVFS()->exists(normalMap)) + boost::replace_last(normalMapFileName, ".", mNormalMapPattern + "."); + if (mImageManager.getVFS()->exists(normalMapFileName)) { - image = mImageManager.getImage(normalMap); + image = mImageManager.getImage(normalMapFileName); } } @@ -196,11 +196,11 @@ namespace Shader } if (mAutoUseSpecularMaps && diffuseMap != NULL && specularMap == NULL) { - std::string specularMap = diffuseMap->getImage(0)->getFileName(); - boost::replace_last(specularMap, ".", mSpecularMapPattern + "."); - if (mImageManager.getVFS()->exists(specularMap)) + std::string specularMapFileName = diffuseMap->getImage(0)->getFileName(); + boost::replace_last(specularMapFileName, ".", mSpecularMapPattern + "."); + if (mImageManager.getVFS()->exists(specularMapFileName)) { - osg::ref_ptr specularMapTex (new osg::Texture2D(mImageManager.getImage(specularMap))); + osg::ref_ptr specularMapTex (new osg::Texture2D(mImageManager.getImage(specularMapFileName))); specularMapTex->setWrap(osg::Texture::WRAP_S, diffuseMap->getWrap(osg::Texture::WRAP_S)); specularMapTex->setWrap(osg::Texture::WRAP_T, diffuseMap->getWrap(osg::Texture::WRAP_T)); specularMapTex->setFilter(osg::Texture::MIN_FILTER, diffuseMap->getFilter(osg::Texture::MIN_FILTER));