]> sigrok.org Git - pulseview.git/commitdiff
Declare a virtual destructor for SignalData
authorMarcus Comstedt <redacted>
Sat, 17 May 2014 10:37:15 +0000 (12:37 +0200)
committerMarcus Comstedt <redacted>
Tue, 1 Jul 2014 11:28:05 +0000 (13:28 +0200)
This fixes the following error:

error: deleting object of polymorphic class type 'pv::data::Analog'
which has non-virtual destructor might cause undefined behaviour
[-Werror=delete-non-virtual-dtor]

Also, the same error for pv::data::Logic.

pv/data/signaldata.h

index 0aa3b348ff68ad3b3e715435c276c510a891359c..280874c4785d074af42b9a7284ae888c4217b02b 100644 (file)
@@ -30,6 +30,7 @@ class SignalData
 {
 public:
        SignalData();
+       virtual ~SignalData() {}
 
 public:
        double samplerate() const;