]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/optimize.h
Refactor variable renaming in InlineContentInjector once again
[libs/gl.git] / source / glsl / optimize.h
index 08ee082b99cd9e070dd5003de3cdc936ef21d396..f6604743810ff1e275198ee554badcd53a75ffa2 100644 (file)
@@ -39,10 +39,18 @@ dependencies of the inlined statements to appear before the target function. */
 class InlineContentInjector: private TraversingVisitor
 {
 private:
+       enum Pass
+       {
+               DEPENDS,
+               REFERENCED,
+               INLINE,
+               RENAME
+       };
+
        FunctionDeclaration *source_func;
        Block staging_block;
        std::string remap_prefix;
-       unsigned remap_names;
+       Pass pass;
        RefPtr<Statement> r_inlined_statement;
        std::set<Node *> dependencies;
        std::set<std::string> referenced_names;