diff --git a/src/Device.h b/src/Device.h index 6b8b29889..04a765ddd 100644 --- a/src/Device.h +++ b/src/Device.h @@ -85,6 +85,7 @@ typedef QSharedPointer DevicesPtr; struct Devices { + virtual ~Devices() {} virtual DevicePtr newDevice( CommPortPtr, Device::StatusCallback ) = 0; // port *might* be supported by this device type implementation: diff --git a/src/ProtocolHandler.h b/src/ProtocolHandler.h index 9a0b35180..6e266d05e 100644 --- a/src/ProtocolHandler.h +++ b/src/ProtocolHandler.h @@ -29,7 +29,7 @@ class ProtocolMessage { public: ProtocolMessage() { } - ~ProtocolMessage() { } + virtual ~ProtocolMessage() { } enum { HELLO, HELLOFAIL, HELLOSUCCEED, CLIENTLIST, CLIENT, TELEMETRY, diff --git a/src/RideFileCommand.h b/src/RideFileCommand.h index 856f34b46..c3c40fe9d 100644 --- a/src/RideFileCommand.h +++ b/src/RideFileCommand.h @@ -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; }