]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/visitor.h
Tweaks to visitor classes in the GLSL compiler
[libs/gl.git] / source / glsl / visitor.h
index e1c45b5c89de152976cfd94549c018f8e7607116..756584c2e262289783a6f58ec75cbfc2c6ec5a46 100644 (file)
@@ -83,7 +83,7 @@ public:
 };
 
 template<typename T>
-class NodeGatherer: public TraversingVisitor
+class NodeGatherer: private TraversingVisitor
 {
 private:
        std::vector<T *> nodes;
@@ -91,11 +91,12 @@ private:
 public:
        const std::vector<T *> &apply(Stage &s) { visit(s.content); return nodes; }
 
+private:
        using TraversingVisitor::visit;
        virtual void visit(T &n) { nodes.push_back(&n); }
 };
 
-class NodeRemover: public TraversingVisitor
+class NodeRemover: private TraversingVisitor
 {
 private:
        Stage *stage;
@@ -106,6 +107,7 @@ public:
 
        void apply(Stage &);
 
+private:
        using TraversingVisitor::visit;
        virtual void visit(Block &);
        virtual void visit(VariableDeclaration &);