]> git.tdb.fi Git - libs/gui.git/blobdiff - source/input/touchscreen.h
Use constexpr instead of enum to define "typeless" constants
[libs/gui.git] / source / input / touchscreen.h
index 0c964068db266d6831d69a643bbb7f1eee681781..d366a28f9f2c33c05f04369eb0601af1d34159a8 100644 (file)
@@ -11,10 +11,7 @@ namespace Input {
 class Touchscreen: public Device, public sigc::trackable
 {
 private:
-       enum
-       {
-               UNUSED = static_cast<unsigned>(-1)
-       };
+       static constexpr unsigned UNUSED = static_cast<unsigned>(-1);
 
        Graphics::Window &window;
        std::vector<unsigned> active_points;
@@ -27,8 +24,8 @@ public:
 
        Graphics::Window &get_window() const { return window; }
 
-       virtual std::string get_button_name(unsigned) const;
-       virtual std::string get_axis_name(unsigned) const;
+       std::string get_button_name(unsigned) const override;
+       std::string get_axis_name(unsigned) const override;
 private:
        void input_event(const Graphics::Window::Event &);