From dff3f6a13d2b9dd8793509e6ca283757a2f47b4d Mon Sep 17 00:00:00 2001 From: Ingo Ruhnke <grumbel@gmx.de> Date: Wed, 26 May 2010 15:17:35 +0200 Subject: [PATCH] Init to invalid type automatically --- src/axis_event.cpp | 5 +++++ src/axis_event.hpp | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/axis_event.cpp b/src/axis_event.cpp index 41ec444..e20f7a5 100644 --- a/src/axis_event.cpp +++ b/src/axis_event.cpp @@ -224,6 +224,11 @@ AxisEvent::key_from_string(const std::string& str) return ev; } +AxisEvent::AxisEvent() : + type(-1) +{ +} + bool AxisEvent::is_valid() const { diff --git a/src/axis_event.hpp b/src/axis_event.hpp index 2c8cb33..ff134ed 100644 --- a/src/axis_event.hpp +++ b/src/axis_event.hpp @@ -46,6 +46,8 @@ private: static AxisEvent key_from_string(const std::string& str); public: + AxisEvent(); + void init(uInput& uinput) const; void send(uInput& uinput, int old_value, int value) const;