]> git.tdb.fi Git - libs/gui.git/blobdiff - source/input/windows/gamecontroller_platform.h
Use nullptr in place of 0 or NULL
[libs/gui.git] / source / input / windows / gamecontroller_platform.h
index 46c2dd8a67d96f764555aa8a8aa671e5ada67d50..1541ae7edb5aad809728682149a6daa3690041be 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 = nullptr;
+       Time::Timer::Slot *timer_slot = nullptr;
 
        static std::vector<unsigned> detected_controllers;
 
-       Private();
-
        bool generate_event();
 
        void update_state(GameController &, const XINPUT_STATE &, bool);