From: Mikko Rasa Date: Sat, 9 Apr 2022 16:02:40 +0000 (+0300) Subject: Use VariableDeclaration in Assignment::Target X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=commitdiff_plain;h=6cb04ca058e463b7d76eba684be89dfc9e77ab29 Use VariableDeclaration in Assignment::Target --- diff --git a/source/glsl/optimize.h b/source/glsl/optimize.h index 33998e5e..807b7a89 100644 --- a/source/glsl/optimize.h +++ b/source/glsl/optimize.h @@ -333,7 +333,7 @@ private: bool referenced = false; }; - typedef std::map BlockVariableMap; + typedef std::map BlockVariableMap; Stage *stage = 0; BlockVariableMap variables; diff --git a/source/glsl/resolve.cpp b/source/glsl/resolve.cpp index fbe60d79..115624c4 100644 --- a/source/glsl/resolve.cpp +++ b/source/glsl/resolve.cpp @@ -179,7 +179,7 @@ void VariableResolver::visit(RefPtr &expr) r_replacement_expr = 0; } -void VariableResolver::check_assignment_target(Statement *declaration) +void VariableResolver::check_assignment_target(VariableDeclaration *declaration) { if(record_target) { diff --git a/source/glsl/resolve.h b/source/glsl/resolve.h index 36af5457..a11b849e 100644 --- a/source/glsl/resolve.h +++ b/source/glsl/resolve.h @@ -69,7 +69,7 @@ public: private: virtual void enter(Block &); virtual void visit(RefPtr &); - void check_assignment_target(Statement *); + void check_assignment_target(VariableDeclaration *); virtual void visit(VariableReference &); virtual void visit(MemberAccess &); virtual void visit(Swizzle &); diff --git a/source/glsl/syntax.h b/source/glsl/syntax.h index 95347e1b..bb002183 100644 --- a/source/glsl/syntax.h +++ b/source/glsl/syntax.h @@ -219,11 +219,11 @@ struct Assignment: BinaryExpression ARRAY = 0xC0 }; - Statement *declaration = 0; + VariableDeclaration *declaration = 0; std::uint8_t chain_len = 0; std::uint8_t chain[7] = { }; - Target(Statement *d = 0): declaration(d) { } + Target(VariableDeclaration *d = 0): declaration(d) { } bool operator<(const Target &) const; };