Commit 149e6e69 by Cooper Partin Committed by Jamie Madill

Fixed compiler warning C4458 'declaration of variable hides class member'.

BUG=angleproject:1119 Change-Id: Ibc7cfdea72abe402cbfa1c10e0ada7576fa1cfa2 Reviewed-on: https://chromium-review.googlesource.com/292052Tested-by: 's avatarCooper Partin <coopp@microsoft.com> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 1e0bc3ad
......@@ -32,14 +32,14 @@ TFunction::~TFunction()
const TString *TFunction::buildMangledName() const
{
std::string mangledName = mangleName(getName()).c_str();
std::string newName = mangleName(getName()).c_str();
for (const auto &p : parameters)
{
mangledName += p.type->getMangledName().c_str();
newName += p.type->getMangledName().c_str();
}
return NewPoolTString(mangledName.c_str());
return NewPoolTString(newName.c_str());
}
//
......
......@@ -28,10 +28,10 @@ void TranslatorESSL::initBuiltInFunctionEmulator(BuiltInFunctionEmulator *emu, i
void TranslatorESSL::translate(TIntermNode *root, int) {
TInfoSinkBase& sink = getInfoSink().obj;
int shaderVersion = getShaderVersion();
if (shaderVersion > 100)
int shaderVer = getShaderVersion();
if (shaderVer > 100)
{
sink << "#version " << shaderVersion << " es\n";
sink << "#version " << shaderVer << " es\n";
}
writePragma();
......@@ -78,13 +78,8 @@ void TranslatorESSL::translate(TIntermNode *root, int) {
getArrayBoundsClamper().OutputClampingFunctionDefinition(sink);
// Write translated shader.
TOutputESSL outputESSL(sink,
getArrayIndexClampingStrategy(),
getHashFunction(),
getNameMap(),
getSymbolTable(),
shaderVersion,
precisionEmulation);
TOutputESSL outputESSL(sink, getArrayIndexClampingStrategy(), getHashFunction(), getNameMap(),
getSymbolTable(), shaderVer, precisionEmulation);
root->traverse(&outputESSL);
}
......
......@@ -491,9 +491,9 @@ class TType
return structure ? structure->containsArrays() : false;
}
bool isStructureContainingType(TBasicType type) const
bool isStructureContainingType(TBasicType t) const
{
return structure ? structure->containsType(type) : false;
return structure ? structure->containsType(t) : false;
}
bool isStructureContainingSamplers() const
......@@ -605,14 +605,14 @@ struct TPublicType
return userDef->isStructureContainingArrays();
}
bool isStructureContainingType(TBasicType type) const
bool isStructureContainingType(TBasicType t) const
{
if (!userDef)
{
return false;
}
return userDef->isStructureContainingType(type);
return userDef->isStructureContainingType(t);
}
bool isMatrix() const
......
......@@ -28,24 +28,24 @@ protected:
}
// Set up the per compile resources
void GenerateResources(ShBuiltInResources* resources)
static void GenerateResources(ShBuiltInResources *res)
{
ShInitBuiltInResources(resources);
resources->MaxVertexAttribs = 8;
resources->MaxVertexUniformVectors = 128;
resources->MaxVaryingVectors = 8;
resources->MaxVertexTextureImageUnits = 0;
resources->MaxCombinedTextureImageUnits = 8;
resources->MaxTextureImageUnits = 8;
resources->MaxFragmentUniformVectors = 16;
resources->MaxDrawBuffers = 1;
resources->OES_standard_derivatives = 0;
resources->OES_EGL_image_external = 0;
resources->MaxExpressionComplexity = kMaxExpressionComplexity;
resources->MaxCallStackDepth = kMaxCallStackDepth;
ShInitBuiltInResources(res);
res->MaxVertexAttribs = 8;
res->MaxVertexUniformVectors = 128;
res->MaxVaryingVectors = 8;
res->MaxVertexTextureImageUnits = 0;
res->MaxCombinedTextureImageUnits = 8;
res->MaxTextureImageUnits = 8;
res->MaxFragmentUniformVectors = 16;
res->MaxDrawBuffers = 1;
res->OES_standard_derivatives = 0;
res->OES_EGL_image_external = 0;
res->MaxExpressionComplexity = kMaxExpressionComplexity;
res->MaxCallStackDepth = kMaxCallStackDepth;
}
void GenerateLongExpression(int length, std::stringstream* ss)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment