• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

A generic touchscreen calibration program for X.Org


Commit MetaInfo

修订版2846eade2601e92d34d40c603988a14dcb7634ac (tree)
时间2013-01-23 02:34:11
作者Andreas Müller <schnitzeltony@goog...>
CommiterAndreas Müller

Log Message

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>

更改概述

差异

--- a/src/calibrator.hh
+++ b/src/calibrator.hh
@@ -148,7 +148,7 @@ public:
148148 const bool use_timeout=1,
149149 const char* output_filename = 0);
150150
151- ~Calibrator() {}
151+ virtual ~Calibrator() {}
152152
153153 /// set the doubleclick treshold
154154 void set_threshold_doubleclick(int t)
--- a/src/calibrator/Evdev.hpp
+++ b/src/calibrator/Evdev.hpp
@@ -60,7 +60,7 @@ public:
6060 const char* geometry=0,
6161 const bool use_timeout=false,
6262 const char* output_filename = 0);
63- ~CalibratorEvdev();
63+ virtual ~CalibratorEvdev();
6464
6565 /// calculate and apply the calibration
6666 virtual bool finish(int width, int height);
--- a/src/calibrator/Usbtouchscreen.hpp
+++ b/src/calibrator/Usbtouchscreen.hpp
@@ -36,7 +36,7 @@ public:
3636 const int thr_misclick=0, const int thr_doubleclick=0,
3737 const OutputType output_type=OUTYPE_AUTO, const char* geometry=0,
3838 const bool use_timeout=false, const char* output_filename = 0);
39- ~CalibratorUsbtouchscreen();
39+ virtual ~CalibratorUsbtouchscreen();
4040
4141 virtual bool finish_data(const XYinfo new_axys);
4242