• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqtwindows誰得cocoapythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

A generic touchscreen calibration program for X.Org


Commit MetaInfo

Révision1236ee66068e7721f21fed602539946e548a73cb (tree)
l'heure2014-02-13 17:28:07
AuteurChristian Gmeiner <christian.gmeiner@gmai...>
CommiterChristian Gmeiner

Message de Log

x11: convert bool methods

There is no need to have bool functions, which will return
true in every case. Also the return type gets not used.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>

Change Summary

Modification

--- a/src/gui/x11.cpp
+++ b/src/gui/x11.cpp
@@ -270,14 +270,12 @@ void GuiCalibratorX11::redraw()
270270 }
271271 }
272272
273-bool GuiCalibratorX11::on_expose_event()
273+void GuiCalibratorX11::on_expose_event()
274274 {
275275 redraw();
276-
277- return true;
278276 }
279277
280-bool GuiCalibratorX11::on_timer_signal()
278+void GuiCalibratorX11::on_timer_signal()
281279 {
282280 // Update clock
283281 if(calibrator->get_use_timeout()) {
@@ -295,11 +293,9 @@ bool GuiCalibratorX11::on_timer_signal()
295293 clock_radius-clock_line_width, clock_radius-clock_line_width,
296294 90*64, ((double)time_elapsed/(double)max_time) * -360 * 64);
297295 }
298-
299- return true;
300296 }
301297
302-bool GuiCalibratorX11::on_button_press_event(XEvent event)
298+void GuiCalibratorX11::on_button_press_event(XEvent event)
303299 {
304300 // Clear window, maybe a bit overdone, but easiest for me atm.
305301 // (goal is to clear possible message and other clicks)
@@ -329,8 +325,6 @@ bool GuiCalibratorX11::on_button_press_event(XEvent event)
329325
330326 // Force a redraw
331327 redraw();
332-
333- return true;
334328 }
335329
336330 void GuiCalibratorX11::draw_message(const char* msg)
--- a/src/gui/x11.hpp
+++ b/src/gui/x11.hpp
@@ -63,9 +63,9 @@ private:
6363 unsigned long pixel[NUM_COLORS];
6464
6565 // Signal handlers
66- bool on_timer_signal();
67- bool on_expose_event();
68- bool on_button_press_event(XEvent event);
66+ void on_timer_signal();
67+ void on_expose_event();
68+ void on_button_press_event(XEvent event);
6969
7070 // Helper functions
7171 void set_display_size(int width, int height);