forked from teamnwah/openmw-tes3coop
Fix shadowing warnings
This commit is contained in:
parent
c32f6a46dd
commit
a5da3a269e
6 changed files with 25 additions and 25 deletions
|
@ -260,7 +260,7 @@ namespace Compiler
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *keywords[] =
|
static const char *sKeywords[] =
|
||||||
{
|
{
|
||||||
"begin", "end",
|
"begin", "end",
|
||||||
"short", "long", "float",
|
"short", "long", "float",
|
||||||
|
@ -306,11 +306,11 @@ namespace Compiler
|
||||||
|
|
||||||
std::string lowerCase = Misc::StringUtils::lowerCase(name);
|
std::string lowerCase = Misc::StringUtils::lowerCase(name);
|
||||||
|
|
||||||
for (; keywords[i]; ++i)
|
for (; sKeywords[i]; ++i)
|
||||||
if (lowerCase==keywords[i])
|
if (lowerCase==sKeywords[i])
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (keywords[i])
|
if (sKeywords[i])
|
||||||
{
|
{
|
||||||
cont = parser.parseKeyword (i, loc, *this);
|
cont = parser.parseKeyword (i, loc, *this);
|
||||||
return true;
|
return true;
|
||||||
|
@ -618,8 +618,8 @@ namespace Compiler
|
||||||
|
|
||||||
void Scanner::listKeywords (std::vector<std::string>& keywords)
|
void Scanner::listKeywords (std::vector<std::string>& keywords)
|
||||||
{
|
{
|
||||||
for (int i=0; Compiler::keywords[i]; ++i)
|
for (int i=0; Compiler::sKeywords[i]; ++i)
|
||||||
keywords.push_back (Compiler::keywords[i]);
|
keywords.push_back (Compiler::sKeywords[i]);
|
||||||
|
|
||||||
if (mExtensions)
|
if (mExtensions)
|
||||||
mExtensions->listKeywords (keywords);
|
mExtensions->listKeywords (keywords);
|
||||||
|
|
|
@ -65,11 +65,11 @@ void ESM::InventoryState::load (ESMReader &esm)
|
||||||
while (esm.isNextSub("EQUI"))
|
while (esm.isNextSub("EQUI"))
|
||||||
{
|
{
|
||||||
esm.getSubHeader();
|
esm.getSubHeader();
|
||||||
int index;
|
int equipIndex;
|
||||||
esm.getT(index);
|
esm.getT(equipIndex);
|
||||||
int slot;
|
int slot;
|
||||||
esm.getT(slot);
|
esm.getT(slot);
|
||||||
mEquipmentSlots[index] = slot;
|
mEquipmentSlots[equipIndex] = slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
mSelectedEnchantItem = -1;
|
mSelectedEnchantItem = -1;
|
||||||
|
|
|
@ -241,9 +241,9 @@ namespace Interpreter
|
||||||
|
|
||||||
while (mRuntime.getPC()>=0 && mRuntime.getPC()<opcodes)
|
while (mRuntime.getPC()>=0 && mRuntime.getPC()<opcodes)
|
||||||
{
|
{
|
||||||
Type_Code code = codeBlock[mRuntime.getPC()];
|
Type_Code runCode = codeBlock[mRuntime.getPC()];
|
||||||
mRuntime.setPC (mRuntime.getPC()+1);
|
mRuntime.setPC (mRuntime.getPC()+1);
|
||||||
execute (code);
|
execute (runCode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
|
|
|
@ -116,7 +116,7 @@ namespace Interpreter
|
||||||
|
|
||||||
for (std::size_t i=0; i<arg0; ++i)
|
for (std::size_t i=0; i<arg0; ++i)
|
||||||
{
|
{
|
||||||
int index = runtime[0].mInteger;
|
index = runtime[0].mInteger;
|
||||||
runtime.pop();
|
runtime.pop();
|
||||||
buttons.push_back (runtime.getStringLiteral (index));
|
buttons.push_back (runtime.getStringLiteral (index));
|
||||||
}
|
}
|
||||||
|
|
|
@ -698,14 +698,14 @@ namespace NifOsg
|
||||||
continue;
|
continue;
|
||||||
if (ctrl->recType == Nif::RC_NiUVController)
|
if (ctrl->recType == Nif::RC_NiUVController)
|
||||||
{
|
{
|
||||||
const Nif::NiUVController *uvctrl = static_cast<const Nif::NiUVController*>(ctrl.getPtr());
|
const Nif::NiUVController *niuvctrl = static_cast<const Nif::NiUVController*>(ctrl.getPtr());
|
||||||
std::set<int> texUnits;
|
std::set<int> texUnits;
|
||||||
for (unsigned int i=0; i<boundTextures.size(); ++i)
|
for (unsigned int i=0; i<boundTextures.size(); ++i)
|
||||||
texUnits.insert(i);
|
texUnits.insert(i);
|
||||||
|
|
||||||
osg::ref_ptr<UVController> ctrl = new UVController(uvctrl->data.getPtr(), texUnits);
|
osg::ref_ptr<UVController> uvctrl = new UVController(niuvctrl->data.getPtr(), texUnits);
|
||||||
setupController(uvctrl, ctrl, animflags);
|
setupController(niuvctrl, uvctrl, animflags);
|
||||||
composite->addController(ctrl);
|
composite->addController(uvctrl);
|
||||||
}
|
}
|
||||||
else if (ctrl->recType == Nif::RC_NiVisController)
|
else if (ctrl->recType == Nif::RC_NiVisController)
|
||||||
{
|
{
|
||||||
|
|
|
@ -154,11 +154,11 @@ namespace Shader
|
||||||
|
|
||||||
if (mAutoUseNormalMaps && diffuseMap != NULL && normalMap == NULL)
|
if (mAutoUseNormalMaps && diffuseMap != NULL && normalMap == NULL)
|
||||||
{
|
{
|
||||||
std::string normalMap = diffuseMap->getImage(0)->getFileName();
|
std::string normalMapFileName = diffuseMap->getImage(0)->getFileName();
|
||||||
|
|
||||||
osg::ref_ptr<osg::Image> image;
|
osg::ref_ptr<osg::Image> image;
|
||||||
bool normalHeight = false;
|
bool normalHeight = false;
|
||||||
std::string normalHeightMap = normalMap;
|
std::string normalHeightMap = normalMapFileName;
|
||||||
boost::replace_last(normalHeightMap, ".", mNormalHeightMapPattern + ".");
|
boost::replace_last(normalHeightMap, ".", mNormalHeightMapPattern + ".");
|
||||||
if (mImageManager.getVFS()->exists(normalHeightMap))
|
if (mImageManager.getVFS()->exists(normalHeightMap))
|
||||||
{
|
{
|
||||||
|
@ -167,10 +167,10 @@ namespace Shader
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
boost::replace_last(normalMap, ".", mNormalMapPattern + ".");
|
boost::replace_last(normalMapFileName, ".", mNormalMapPattern + ".");
|
||||||
if (mImageManager.getVFS()->exists(normalMap))
|
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)
|
if (mAutoUseSpecularMaps && diffuseMap != NULL && specularMap == NULL)
|
||||||
{
|
{
|
||||||
std::string specularMap = diffuseMap->getImage(0)->getFileName();
|
std::string specularMapFileName = diffuseMap->getImage(0)->getFileName();
|
||||||
boost::replace_last(specularMap, ".", mSpecularMapPattern + ".");
|
boost::replace_last(specularMapFileName, ".", mSpecularMapPattern + ".");
|
||||||
if (mImageManager.getVFS()->exists(specularMap))
|
if (mImageManager.getVFS()->exists(specularMapFileName))
|
||||||
{
|
{
|
||||||
osg::ref_ptr<osg::Texture2D> specularMapTex (new osg::Texture2D(mImageManager.getImage(specularMap)));
|
osg::ref_ptr<osg::Texture2D> specularMapTex (new osg::Texture2D(mImageManager.getImage(specularMapFileName)));
|
||||||
specularMapTex->setWrap(osg::Texture::WRAP_S, diffuseMap->getWrap(osg::Texture::WRAP_S));
|
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->setWrap(osg::Texture::WRAP_T, diffuseMap->getWrap(osg::Texture::WRAP_T));
|
||||||
specularMapTex->setFilter(osg::Texture::MIN_FILTER, diffuseMap->getFilter(osg::Texture::MIN_FILTER));
|
specularMapTex->setFilter(osg::Texture::MIN_FILTER, diffuseMap->getFilter(osg::Texture::MIN_FILTER));
|
||||||
|
|
Loading…
Reference in a new issue