Commit d300f5b0 by alokp@chromium.org

Removed redundant null-check. Patch submitted by timeless.

BUG=58 Review URL: http://codereview.appspot.com/2470042 git-svn-id: https://angleproject.googlecode.com/svn/trunk@453 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 18895cb1
...@@ -1025,6 +1025,7 @@ bool TParseContext::executeInitializer(TSourceLoc line, TString& identifier, TPu ...@@ -1025,6 +1025,7 @@ bool TParseContext::executeInitializer(TSourceLoc line, TString& identifier, TPu
bool TParseContext::areAllChildConst(TIntermAggregate* aggrNode) bool TParseContext::areAllChildConst(TIntermAggregate* aggrNode)
{ {
ASSERT(aggrNode != NULL);
if (!aggrNode->isConstructor()) if (!aggrNode->isConstructor())
return false; return false;
...@@ -1032,13 +1033,10 @@ bool TParseContext::areAllChildConst(TIntermAggregate* aggrNode) ...@@ -1032,13 +1033,10 @@ bool TParseContext::areAllChildConst(TIntermAggregate* aggrNode)
// check if all the child nodes are constants so that they can be inserted into // check if all the child nodes are constants so that they can be inserted into
// the parent node // the parent node
if (aggrNode) { TIntermSequence &sequence = aggrNode->getSequence() ;
TIntermSequence &childSequenceVector = aggrNode->getSequence() ; for (TIntermSequence::iterator p = sequence.begin(); p != sequence.end(); ++p) {
for (TIntermSequence::iterator p = childSequenceVector.begin(); if (!(*p)->getAsTyped()->getAsConstantUnion())
p != childSequenceVector.end(); p++) { return false;
if (!(*p)->getAsTyped()->getAsConstantUnion())
return false;
}
} }
return allConstant; return allConstant;
......
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