]> git.tdb.fi Git - libs/gl.git/blobdiff - source/programcompiler.h
Use vector when there's no reason to use some other container
[libs/gl.git] / source / programcompiler.h
index d7b8a8701ff0f8687cf871e59f000ba18c134ed2..b14c03d8021fa5fa4726aa9a9ef6b9cbbb94be1c 100644 (file)
@@ -29,7 +29,7 @@ private:
        struct BlockModifier: Visitor
        {
                bool remove_node;
-               std::list<RefPtr<ProgramSyntax::Node> > insert_nodes;
+               std::vector<RefPtr<ProgramSyntax::Node> > insert_nodes;
 
                BlockModifier();
 
@@ -81,9 +81,9 @@ private:
        template<typename T>
        struct NodeGatherer: Visitor
        {
-               typedef std::list<T *> ResultType;
+               typedef std::vector<T *> ResultType;
 
-               std::list<T *> nodes;
+               std::vector<T *> nodes;
 
                const ResultType &get_result() const { return nodes; }
                using Visitor::visit;
@@ -158,13 +158,6 @@ private:
                virtual void visit(ProgramSyntax::Passthrough &);
        };
 
-       struct VariableRenamer: Visitor
-       {
-               using Visitor::visit;
-               virtual void visit(ProgramSyntax::VariableReference &);
-               virtual void visit(ProgramSyntax::VariableDeclaration &);
-       };
-
        struct DeclarationReorderer: Visitor
        {
                enum DeclarationKind