From 8b72229ffd33aa35d34a7226eb82a485ae36b1dd Mon Sep 17 00:00:00 2001 From: James Turner Date: Sun, 19 Aug 2018 12:34:47 +0100 Subject: [PATCH] C++11 improvements in Mac event-input code --- src/Input/FGMacOSXEventInput.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Input/FGMacOSXEventInput.cxx b/src/Input/FGMacOSXEventInput.cxx index 9eb7e80a6..4fee85f2c 100644 --- a/src/Input/FGMacOSXEventInput.cxx +++ b/src/Input/FGMacOSXEventInput.cxx @@ -94,10 +94,10 @@ static std::string nameForUsage(uint32_t usagePage, uint32_t usage) class FGMacOSXEventInputPrivate { public: - IOHIDManagerRef hidManager; - FGMacOSXEventInput* p; - double currentDt; - int currentModifiers; + IOHIDManagerRef hidManager = nullptr; + FGMacOSXEventInput* p = nullptr; + double currentDt = 0.0; + int currentModifiers = 0; void matchedDevice(IOHIDDeviceRef device); void removedDevice(IOHIDDeviceRef device); @@ -170,8 +170,8 @@ private: std::string nameForHIDElement(IOHIDElementRef element) const; - IOHIDDeviceRef _hid; - IOHIDQueueRef _queue; + IOHIDDeviceRef _hid = nullptr; + IOHIDQueueRef _queue = nullptr; FGMacOSXEventInputPrivate* _subsystem; typedef std::map NameElementDict;