]> git.tdb.fi Git - libs/gui.git/blobdiff - source/input/windows/gamecontroller_platform.h
Use default member initializers and defaulted default constructors
[libs/gui.git] / source / input / windows / gamecontroller_platform.h
index 46c2dd8a67d96f764555aa8a8aa671e5ada67d50..d6ee6c27d4bc2f252acf3bc26d1fb4187f37d30b 100644 (file)
@@ -14,7 +14,7 @@ class GameControllerTimerThread: public Msp::Thread
 {
 private:
        Time::Timer timer;
-       unsigned n_users;
+       unsigned n_users = 0;
 
        static GameControllerTimerThread *thread;
 
@@ -25,21 +25,19 @@ public:
        static void remove_slot(Time::Timer::Slot &);
 
 private:
-       virtual void main();
+       void main() override;
 };
 
 
 struct GameController::Private
 {
-       unsigned index;
-       unsigned last_packet_number;
-       IO::Pipe *event_pipe;
-       Time::Timer::Slot *timer_slot;
+       unsigned index = 0;
+       unsigned last_packet_number = 0;
+       IO::Pipe *event_pipe = 0;
+       Time::Timer::Slot *timer_slot = 0;
 
        static std::vector<unsigned> detected_controllers;
 
-       Private();
-
        bool generate_event();
 
        void update_state(GameController &, const XINPUT_STATE &, bool);