From 12c7cdcf0eff8e3d7a7d76ab160ddd47e1cd28f8 Mon Sep 17 00:00:00 2001 From: florijan <florijan@memgraph.io> Date: Mon, 13 Mar 2017 15:05:16 +0100 Subject: [PATCH] Add virtual destructor to TreeVisitorBase --- src/query/frontend/ast/ast.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/query/frontend/ast/ast.hpp b/src/query/frontend/ast/ast.hpp index 2522186ea..10dd191cd 100644 --- a/src/query/frontend/ast/ast.hpp +++ b/src/query/frontend/ast/ast.hpp @@ -23,6 +23,7 @@ class EdgePart; class TreeVisitorBase { public: + virtual ~TreeVisitorBase() {} // Start of the tree is a Query. virtual void PreVisit(Query &) {} virtual void Visit(Query &query) = 0; @@ -71,7 +72,6 @@ public: class Ident : public Expr { public: - Ident(int) = delete; Ident(int uid, const std::string &identifier) : Expr(uid), identifier_(identifier) {} @@ -85,11 +85,6 @@ public: std::string identifier_; }; -class Part : public Tree { -public: - Part(int uid) : Tree(uid) {} -}; - class NamedExpr : public Tree { public: NamedExpr(int uid) : Tree(uid) {} @@ -106,6 +101,11 @@ public: std::shared_ptr<Expr> expr_; }; +class Part : public Tree { +public: + Part(int uid) : Tree(uid) {} +}; + class NodePart : public Part { public: NodePart(int uid) : Part(uid) {}