]> git.tdb.fi Git - libs/gl.git/commitdiff
Use VariableDeclaration in Assignment::Target
authorMikko Rasa <tdb@tdb.fi>
Sat, 9 Apr 2022 16:02:40 +0000 (19:02 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 9 Apr 2022 16:05:05 +0000 (19:05 +0300)
source/glsl/optimize.h
source/glsl/resolve.cpp
source/glsl/resolve.h
source/glsl/syntax.h

index 33998e5e7408197b696203f1d6143e9f85f759cf..807b7a89ac90feb4c8f2d57afbeb2e2f5bb17596 100644 (file)
@@ -333,7 +333,7 @@ private:
                bool referenced = false;
        };
 
-       typedef std::map<Statement *, VariableInfo> BlockVariableMap;
+       typedef std::map<VariableDeclaration *, VariableInfo> BlockVariableMap;
 
        Stage *stage = 0;
        BlockVariableMap variables;
index fbe60d79def36ee514e9598541a2ab99f05b4539..115624c496639e5413077779e28aabd9c2321ce6 100644 (file)
@@ -179,7 +179,7 @@ void VariableResolver::visit(RefPtr<Expression> &expr)
        r_replacement_expr = 0;
 }
 
-void VariableResolver::check_assignment_target(Statement *declaration)
+void VariableResolver::check_assignment_target(VariableDeclaration *declaration)
 {
        if(record_target)
        {
index 36af54578da987b53fafcdabaffc3d6130b57a55..a11b849e251acafd887061521ea9e51bf0369141 100644 (file)
@@ -69,7 +69,7 @@ public:
 private:
        virtual void enter(Block &);
        virtual void visit(RefPtr<Expression> &);
-       void check_assignment_target(Statement *);
+       void check_assignment_target(VariableDeclaration *);
        virtual void visit(VariableReference &);
        virtual void visit(MemberAccess &);
        virtual void visit(Swizzle &);
index 95347e1bbb5831deaf9ffceb58cc1e196df25cde..bb00218314053443e3f062e8b251107f1cdad006 100644 (file)
@@ -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;
        };