From 1fab644753443a525475740fc23172dedaa70d0e Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Tue, 27 Feb 2018 16:21:17 +0100 Subject: Use default member initialization for raw pointers Initialize to nullptr to prevent undefined behavior. Change-Id: I7753c0be77a886d62ecb1cd7b86fc8c98340b0b8 Reviewed-by: Paul Olav Tvete Reviewed-by: Shawn Rutledge --- src/client/qwaylandtouch_p.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/client/qwaylandtouch_p.h') diff --git a/src/client/qwaylandtouch_p.h b/src/client/qwaylandtouch_p.h index 7d909769d..93a829e21 100644 --- a/src/client/qwaylandtouch_p.h +++ b/src/client/qwaylandtouch_p.h @@ -73,7 +73,7 @@ public: private: void registerDevice(int caps); - QWaylandDisplay *mDisplay; + QWaylandDisplay *mDisplay = nullptr; void touch_extension_touch(uint32_t time, uint32_t id, @@ -95,15 +95,15 @@ private: QList mTouchPoints; QList mPrevTouchPoints; - QTouchDevice *mTouchDevice; + QTouchDevice *mTouchDevice = nullptr; uint32_t mTimestamp; int mPointsLeft; uint32_t mFlags; int mMouseSourceId; QPointF mLastMouseLocal; QPointF mLastMouseGlobal; - QWindow *mTargetWindow; - QWaylandInputDevice *mInputDevice; + QWindow *mTargetWindow = nullptr; + QWaylandInputDevice *mInputDevice = nullptr; }; } -- cgit v1.2.3