From 58687ee7c45c531e7db55a7e963ec08edbcbda6b Mon Sep 17 00:00:00 2001 From: Matthew Woehlke Date: Thu, 9 Nov 2017 14:18:30 -0500 Subject: [PATCH] Add explicit virtual dtor Add explicit virtual dtor to GraphBuilderInterface. This avoids tripping a -Wnon-virtual-dtor warning, and also ensures that the correct (virtual) dtor is called if an instance is deleted via a pointer to the base type. --- include/yaml-cpp/contrib/graphbuilder.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/yaml-cpp/contrib/graphbuilder.h b/include/yaml-cpp/contrib/graphbuilder.h index 7c2159b..f0a38f2 100644 --- a/include/yaml-cpp/contrib/graphbuilder.h +++ b/include/yaml-cpp/contrib/graphbuilder.h @@ -19,6 +19,8 @@ class Parser; // functions. class GraphBuilderInterface { public: + virtual ~GraphBuilderInterface() = 0; + // Create and return a new node with a null value. virtual void *NewNull(const Mark &mark, void *pParentNode) = 0;