X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finput%2Fgesturedetector.h;h=0b31fd8c1c23aff34aad6914c0d23634566a6cdd;hb=3c5bbaeadb33d288c0f9e487b52904b7ed7e4319;hp=5f7c4afc4f729ee0322db88c0ff44611e02ee458;hpb=43d31e73c4b97a37017757232c4ef1db355fee3a;p=libs%2Fgui.git diff --git a/source/input/gesturedetector.h b/source/input/gesturedetector.h index 5f7c4af..0b31fd8 100644 --- a/source/input/gesturedetector.h +++ b/source/input/gesturedetector.h @@ -30,10 +30,7 @@ absolute values greater than one. class GestureDetector: public Device { private: - enum - { - MAX_POINTS = 3 - }; + static constexpr size_t MAX_POINTS = 3; struct TouchPoint { @@ -49,11 +46,11 @@ private: Touchscreen &touchscreen; TouchPoint points[MAX_POINTS]; - Gesture current_gesture; - Gesture pending_tap; - bool invalid_gesture; - float threshold_x_sq; - float threshold_y_sq; + Gesture current_gesture = GESTURE_NONE; + Gesture pending_tap = GESTURE_NONE; + bool invalid_gesture = false; + float threshold_x_sq = 1.0f; + float threshold_y_sq = 1.0f; public: GestureDetector(Touchscreen &);