summaryrefslogtreecommitdiffstats
path: root/tests/auto/client/shared/mockcompositor.h
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2018-02-27 16:21:17 +0100
committerJohan Helsing <johan.helsing@qt.io>2018-02-28 10:51:35 +0000
commit1fab644753443a525475740fc23172dedaa70d0e (patch)
treebca0a88662679acd150172f5a73f64d1604960cf /tests/auto/client/shared/mockcompositor.h
parentc4bd9198b4a0fac809903dd2c09276c2c3c1b22e (diff)
Use default member initialization for raw pointers
Initialize to nullptr to prevent undefined behavior. Change-Id: I7753c0be77a886d62ecb1cd7b86fc8c98340b0b8 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tests/auto/client/shared/mockcompositor.h')
-rw-r--r--tests/auto/client/shared/mockcompositor.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/client/shared/mockcompositor.h b/tests/auto/client/shared/mockcompositor.h
index c6de12376..c0c3c884f 100644
--- a/tests/auto/client/shared/mockcompositor.h
+++ b/tests/auto/client/shared/mockcompositor.h
@@ -141,7 +141,7 @@ private:
friend class Impl::Compositor;
friend class Impl::Surface;
- Impl::Surface *m_surface;
+ Impl::Surface *m_surface = nullptr;
};
Q_DECLARE_METATYPE(QSharedPointer<MockSurface>)
@@ -151,7 +151,7 @@ public:
Impl::Output *handle() const { return m_output; }
MockOutput(Impl::Output *output);
private:
- Impl::Output *m_output;
+ Impl::Output *m_output = nullptr;
};
Q_DECLARE_METATYPE(QSharedPointer<MockOutput>)
@@ -201,7 +201,7 @@ private:
typedef void (*Callback)(void *target, const QList<QVariant> &parameters);
Callback callback;
- void *target;
+ void *target = nullptr;
QList<QVariant> parameters;
};