Fix -Wdelete-non-virtual-dtor warnings

Base classes should have virtual destructors to
ensure derived classes destructor is also virtual.

This is not a major issue, since in all of the
warning cases there is no base destructor, but
its nice to shutup the compiler warnings.
This commit is contained in:
Mark Liversedge
2012-12-27 19:10:05 +00:00
parent 58b21e1c20
commit 0edeef648f
3 changed files with 5 additions and 2 deletions

View File

@@ -85,6 +85,7 @@ typedef QSharedPointer<Devices> DevicesPtr;
struct Devices
{
virtual ~Devices() {}
virtual DevicePtr newDevice( CommPortPtr, Device::StatusCallback ) = 0;
// port *might* be supported by this device type implementation:

View File

@@ -29,7 +29,7 @@
class ProtocolMessage {
public:
ProtocolMessage() { }
~ProtocolMessage() { }
virtual ~ProtocolMessage() { }
enum {
HELLO, HELLOFAIL, HELLOSUCCEED, CLIENTLIST, CLIENT, TELEMETRY,

View File

@@ -46,7 +46,7 @@ class RideFileCommand : public QObject
public:
RideFileCommand(RideFile *ride);
~RideFileCommand();
virtual ~RideFileCommand();
void setPointValue(int index, RideFile::SeriesType series, double value);
void deletePoint(int index);
@@ -97,7 +97,9 @@ class RideCommand
enum commandtype { NoOp, LUW, SetPointValue, DeletePoint, DeletePoints, InsertPoint, AppendPoints, SetDataPresent };
typedef enum commandtype CommandType;
RideCommand(RideFile *ride) : type(NoOp), ride(ride), docount(0) {}
virtual ~RideCommand() {}
virtual bool doCommand() { return true; }
virtual bool undoCommand() { return true; }