From 8c5aae0722c56395f59814ea5029bbaa81f68625 Mon Sep 17 00:00:00 2001 From: Allofich Date: Sun, 21 Aug 2016 18:18:41 +0900 Subject: [PATCH] Add virtual destructors --- components/compiler/lineparser.cpp | 2 ++ components/compiler/lineparser.hpp | 3 +++ components/misc/messageformatparser.cpp | 2 ++ components/misc/messageformatparser.hpp | 2 ++ 4 files changed, 9 insertions(+) diff --git a/components/compiler/lineparser.cpp b/components/compiler/lineparser.cpp index a5b67f58be..ad79877efb 100644 --- a/components/compiler/lineparser.cpp +++ b/components/compiler/lineparser.cpp @@ -59,6 +59,8 @@ namespace Compiler mExprParser (errorHandler, context, locals, literals), mAllowExpression (allowExpression) {} + LineParser::~LineParser() {} + bool LineParser::parseInt (int value, const TokenLoc& loc, Scanner& scanner) { if (mAllowExpression && mState==BeginState) diff --git a/components/compiler/lineparser.hpp b/components/compiler/lineparser.hpp index d92c4895e2..1de4fa9274 100644 --- a/components/compiler/lineparser.hpp +++ b/components/compiler/lineparser.hpp @@ -51,6 +51,9 @@ namespace Compiler bool allowExpression = false); ///< \param allowExpression Allow lines consisting of a naked expression /// (result is send to the messagebox interface) + + virtual ~LineParser(); + ///< destructor virtual bool parseInt (int value, const TokenLoc& loc, Scanner& scanner); ///< Handle an int token. diff --git a/components/misc/messageformatparser.cpp b/components/misc/messageformatparser.cpp index 7c0c978b29..bfd8dd562d 100644 --- a/components/misc/messageformatparser.cpp +++ b/components/misc/messageformatparser.cpp @@ -2,6 +2,8 @@ namespace Misc { + MessageFormatParser::~MessageFormatParser() {} + void MessageFormatParser::process(const std::string& m) { for (unsigned int i = 0; i < m.size(); ++i) diff --git a/components/misc/messageformatparser.hpp b/components/misc/messageformatparser.hpp index 48faff714d..c12b9352ae 100644 --- a/components/misc/messageformatparser.hpp +++ b/components/misc/messageformatparser.hpp @@ -19,6 +19,8 @@ namespace Misc virtual void visitedCharacter(char c) = 0; public: + virtual ~MessageFormatParser(); + virtual void process(const std::string& message); }; }