A generic touchscreen calibration program for X.Org
修订版 | 2846eade2601e92d34d40c603988a14dcb7634ac (tree) |
---|---|
时间 | 2013-01-23 02:34:11 |
作者 | Andreas Müller <schnitzeltony@goog...> |
Commiter | Andreas Müller |
Make all Calibrator* destructors virtual to fix warning
warning was:
main_x11.cpp: In function 'int main(int, char**)':
main_x11.cpp:42:12: warning: deleting object of abstract class type 'Calibrator' which has non-virtual destructor will cause undefined behaviour [-Wdelete-non-virtual-dtor]calibrator/Usbtouchscreen.cpp: In member function 'void CalibratorUsbtouchscreen::read_int_parameter(const char*, int&)':
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
@@ -148,7 +148,7 @@ public: | ||
148 | 148 | const bool use_timeout=1, |
149 | 149 | const char* output_filename = 0); |
150 | 150 | |
151 | - ~Calibrator() {} | |
151 | + virtual ~Calibrator() {} | |
152 | 152 | |
153 | 153 | /// set the doubleclick treshold |
154 | 154 | void set_threshold_doubleclick(int t) |
@@ -60,7 +60,7 @@ public: | ||
60 | 60 | const char* geometry=0, |
61 | 61 | const bool use_timeout=false, |
62 | 62 | const char* output_filename = 0); |
63 | - ~CalibratorEvdev(); | |
63 | + virtual ~CalibratorEvdev(); | |
64 | 64 | |
65 | 65 | /// calculate and apply the calibration |
66 | 66 | virtual bool finish(int width, int height); |
@@ -36,7 +36,7 @@ public: | ||
36 | 36 | const int thr_misclick=0, const int thr_doubleclick=0, |
37 | 37 | const OutputType output_type=OUTYPE_AUTO, const char* geometry=0, |
38 | 38 | const bool use_timeout=false, const char* output_filename = 0); |
39 | - ~CalibratorUsbtouchscreen(); | |
39 | + virtual ~CalibratorUsbtouchscreen(); | |
40 | 40 | |
41 | 41 | virtual bool finish_data(const XYinfo new_axys); |
42 | 42 |