Small tweak to switch statements: use a smaller base class.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21138 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2013-04-12 22:57:28 +00:00
parent b49a191532
commit 78016eff17
2 changed files with 3 additions and 1 deletions

View File

@ -566,7 +566,7 @@ protected:
// in between (if any) consecutive case/defaults. So, a traversal need only deal with // in between (if any) consecutive case/defaults. So, a traversal need only deal with
// 0 or 1 nodes per case/default statement. // 0 or 1 nodes per case/default statement.
// //
class TIntermSwitch : public TIntermAggregate { class TIntermSwitch : public TIntermNode {
public: public:
TIntermSwitch(TIntermTyped* cond, TIntermAggregate* b) : condition(cond), body(b) { } TIntermSwitch(TIntermTyped* cond, TIntermAggregate* b) : condition(cond), body(b) { }
virtual void traverse(TIntermTraverser*); virtual void traverse(TIntermTraverser*);

View File

@ -1594,6 +1594,8 @@ void TParseContext::wrapupSwitchSubsequence(TIntermAggregate* statements, TInter
} }
if (branchNode) if (branchNode)
switchSequence->push_back(branchNode); switchSequence->push_back(branchNode);
// TODO: semantics: verify no duplicated case values
} }
// //