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() ...@@ -32,14 +32,14 @@ TFunction::~TFunction()
const TString *TFunction::buildMangledName() const const TString *TFunction::buildMangledName() const
{ {
std::string mangledName = mangleName(getName()).c_str(); std::string newName = mangleName(getName()).c_str();
for (const auto &p : parameters) 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 ...@@ -28,10 +28,10 @@ void TranslatorESSL::initBuiltInFunctionEmulator(BuiltInFunctionEmulator *emu, i
void TranslatorESSL::translate(TIntermNode *root, int) { void TranslatorESSL::translate(TIntermNode *root, int) {
TInfoSinkBase& sink = getInfoSink().obj; TInfoSinkBase& sink = getInfoSink().obj;
int shaderVersion = getShaderVersion(); int shaderVer = getShaderVersion();
if (shaderVersion > 100) if (shaderVer > 100)
{ {
sink << "#version " << shaderVersion << " es\n"; sink << "#version " << shaderVer << " es\n";
} }
writePragma(); writePragma();
...@@ -78,13 +78,8 @@ void TranslatorESSL::translate(TIntermNode *root, int) { ...@@ -78,13 +78,8 @@ void TranslatorESSL::translate(TIntermNode *root, int) {
getArrayBoundsClamper().OutputClampingFunctionDefinition(sink); getArrayBoundsClamper().OutputClampingFunctionDefinition(sink);
// Write translated shader. // Write translated shader.
TOutputESSL outputESSL(sink, TOutputESSL outputESSL(sink, getArrayIndexClampingStrategy(), getHashFunction(), getNameMap(),
getArrayIndexClampingStrategy(), getSymbolTable(), shaderVer, precisionEmulation);
getHashFunction(),
getNameMap(),
getSymbolTable(),
shaderVersion,
precisionEmulation);
root->traverse(&outputESSL); root->traverse(&outputESSL);
} }
......
...@@ -491,9 +491,9 @@ class TType ...@@ -491,9 +491,9 @@ class TType
return structure ? structure->containsArrays() : false; 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 bool isStructureContainingSamplers() const
...@@ -605,14 +605,14 @@ struct TPublicType ...@@ -605,14 +605,14 @@ struct TPublicType
return userDef->isStructureContainingArrays(); return userDef->isStructureContainingArrays();
} }
bool isStructureContainingType(TBasicType type) const bool isStructureContainingType(TBasicType t) const
{ {
if (!userDef) if (!userDef)
{ {
return false; return false;
} }
return userDef->isStructureContainingType(type); return userDef->isStructureContainingType(t);
} }
bool isMatrix() const bool isMatrix() const
......
...@@ -28,24 +28,24 @@ protected: ...@@ -28,24 +28,24 @@ protected:
} }
// Set up the per compile resources // Set up the per compile resources
void GenerateResources(ShBuiltInResources* resources) static void GenerateResources(ShBuiltInResources *res)
{ {
ShInitBuiltInResources(resources); ShInitBuiltInResources(res);
resources->MaxVertexAttribs = 8; res->MaxVertexAttribs = 8;
resources->MaxVertexUniformVectors = 128; res->MaxVertexUniformVectors = 128;
resources->MaxVaryingVectors = 8; res->MaxVaryingVectors = 8;
resources->MaxVertexTextureImageUnits = 0; res->MaxVertexTextureImageUnits = 0;
resources->MaxCombinedTextureImageUnits = 8; res->MaxCombinedTextureImageUnits = 8;
resources->MaxTextureImageUnits = 8; res->MaxTextureImageUnits = 8;
resources->MaxFragmentUniformVectors = 16; res->MaxFragmentUniformVectors = 16;
resources->MaxDrawBuffers = 1; res->MaxDrawBuffers = 1;
resources->OES_standard_derivatives = 0; res->OES_standard_derivatives = 0;
resources->OES_EGL_image_external = 0; res->OES_EGL_image_external = 0;
resources->MaxExpressionComplexity = kMaxExpressionComplexity; res->MaxExpressionComplexity = kMaxExpressionComplexity;
resources->MaxCallStackDepth = kMaxCallStackDepth; res->MaxCallStackDepth = kMaxCallStackDepth;
} }
void GenerateLongExpression(int length, std::stringstream* ss) 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