build+src: mark destructor virtual in classes with virtual functions
And to prevent similar mistakes in the future, add -Wnon-virtual-dtor
to the default build flags.
Change-Id: I28e2361341abab29fca134309288cd259736d67a
diff --git a/src/mgmt/control-parameters.hpp b/src/mgmt/control-parameters.hpp
index f436056..50646a7 100644
--- a/src/mgmt/control-parameters.hpp
+++ b/src/mgmt/control-parameters.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2013-2015 Regents of the University of California.
+ * Copyright (c) 2013-2017 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -32,6 +32,9 @@
class ControlParameters
{
public:
+ virtual
+ ~ControlParameters() = default;
+
virtual void
wireDecode(const Block& wire) = 0;