X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fglsl%2Fvisitor.h;h=622a4834910d9d1f1a1f8e74db8c06af6c29a506;hp=3b558bd195c5cf6a9f0e68d57127d1d8159aa9b0;hb=38712d8ecc57d043a2419ffbaeeb57f7a6586f14;hpb=3a1fe833ea04df75449706f1d773f6e65521a392 diff --git a/source/glsl/visitor.h b/source/glsl/visitor.h index 3b558bd1..622a4834 100644 --- a/source/glsl/visitor.h +++ b/source/glsl/visitor.h @@ -13,13 +13,12 @@ namespace SL { class NodeVisitor { protected: - NodeVisitor() { } + NodeVisitor() = default; public: - virtual ~NodeVisitor() { } + virtual ~NodeVisitor() = default; virtual void visit(Block &) { } virtual void visit(Literal &) { } - virtual void visit(ParenthesizedExpression &) { } virtual void visit(VariableReference &) { } virtual void visit(InterfaceBlockReference &) { } virtual void visit(MemberAccess &) { } @@ -51,15 +50,14 @@ public: class TraversingVisitor: public NodeVisitor { protected: - Block *current_block; + Block *current_block = 0; - TraversingVisitor(): current_block(0) { } + TraversingVisitor() = default; public: virtual void enter(Block &) { } virtual void visit(Block &); virtual void visit(RefPtr &); - virtual void visit(ParenthesizedExpression &); virtual void visit(MemberAccess &); virtual void visit(Swizzle &); virtual void visit(UnaryExpression &); @@ -83,13 +81,11 @@ public: class NodeRemover: private TraversingVisitor { private: - Stage *stage; - const std::set *to_remove; - bool recursive_remove; + Stage *stage = 0; + const std::set *to_remove = 0; + bool recursive_remove = false; public: - NodeRemover(); - void apply(Stage &, const std::set &); private: @@ -112,12 +108,10 @@ on the same hierarchly level as the target node are reordered. */ class NodeReorderer: private TraversingVisitor { private: - Node *reorder_before; - const std::set *to_reorder; + Node *reorder_before = 0; + const std::set *to_reorder = 0; public: - NodeReorderer(); - void apply(Stage &, Node &, const std::set &); private: