X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fglsl%2Fvisitor.h;h=622a4834910d9d1f1a1f8e74db8c06af6c29a506;hp=ed2534cb31b865900e142a141632fc4f35be497a;hb=38712d8ecc57d043a2419ffbaeeb57f7a6586f14;hpb=3bc34893905a2df622894aadcb6669f27f186772 diff --git a/source/glsl/visitor.h b/source/glsl/visitor.h index ed2534cb..622a4834 100644 --- a/source/glsl/visitor.h +++ b/source/glsl/visitor.h @@ -13,9 +13,9 @@ namespace SL { class NodeVisitor { protected: - NodeVisitor() { } + NodeVisitor() = default; public: - virtual ~NodeVisitor() { } + virtual ~NodeVisitor() = default; virtual void visit(Block &) { } virtual void visit(Literal &) { } @@ -50,9 +50,9 @@ public: class TraversingVisitor: public NodeVisitor { protected: - Block *current_block; + Block *current_block = 0; - TraversingVisitor(): current_block(0) { } + TraversingVisitor() = default; public: virtual void enter(Block &) { } @@ -81,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: @@ -110,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: