aboutsummaryrefslogtreecommitdiffstats
path: root/tests/libminimal/listuser.h
diff options
context:
space:
mode:
authorMatthew Woehlke <matthew.woehlke@kitware.com>2013-06-27 17:25:34 -0400
committerJohn Ehresman <jpe@wingware.com>2013-06-28 23:16:06 +0200
commit288f57f34fe1ebec409ec60868d5bde057440886 (patch)
tree4bd7f68704e49538a025f3f525dbfe7da3ff1204 /tests/libminimal/listuser.h
parent297f2708dfd049b8b475ee1e680a788f0dfe164b (diff)
Don't break -Werror=non-virtual-dtor
Classes with virtual methods but non-virtual destructors are dangerous, because users often hold pointers-to-base-class of derived classes, which cannot correctly destruct the derived class if deleted. As such, there is the aforementioned warning that developers may like to promote to an error. Add virtual (empty) destructors to some classes that were tripping this, so that we build successfully if said flag is used, and because they should probably be present. Change-Id: I930ad5f5d122cf94c57e52bf28479cf3ca7950d4 Reviewed-by: John Cummings <jcummings2@users.sf.net> Reviewed-by: John Ehresman <jpe@wingware.com>
Diffstat (limited to 'tests/libminimal/listuser.h')
-rw-r--r--tests/libminimal/listuser.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/libminimal/listuser.h b/tests/libminimal/listuser.h
index 86e261c58..42585554a 100644
--- a/tests/libminimal/listuser.h
+++ b/tests/libminimal/listuser.h
@@ -32,6 +32,8 @@
struct LIBMINIMAL_API ListUser
{
+ virtual ~ListUser() {}
+
// List of C++ primitive type items
virtual std::list<int> createIntList(int num);
std::list<int> callCreateIntList(int num) { return createIntList(num); }