From 78016eff17e19d6abe72735687d06627a2bab336 Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Fri, 12 Apr 2013 22:57:28 +0000 Subject: [PATCH] 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 --- glslang/Include/intermediate.h | 2 +- glslang/MachineIndependent/ParseHelper.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/glslang/Include/intermediate.h b/glslang/Include/intermediate.h index d35ae8f8..e71da208 100644 --- a/glslang/Include/intermediate.h +++ b/glslang/Include/intermediate.h @@ -566,7 +566,7 @@ protected: // in between (if any) consecutive case/defaults. So, a traversal need only deal with // 0 or 1 nodes per case/default statement. // -class TIntermSwitch : public TIntermAggregate { +class TIntermSwitch : public TIntermNode { public: TIntermSwitch(TIntermTyped* cond, TIntermAggregate* b) : condition(cond), body(b) { } virtual void traverse(TIntermTraverser*); diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp index 73784538..9b82ae62 100644 --- a/glslang/MachineIndependent/ParseHelper.cpp +++ b/glslang/MachineIndependent/ParseHelper.cpp @@ -1594,6 +1594,8 @@ void TParseContext::wrapupSwitchSubsequence(TIntermAggregate* statements, TInter } if (branchNode) switchSequence->push_back(branchNode); + + // TODO: semantics: verify no duplicated case values } //