From 8112ac3371230d0d99733c4b71fb2fac3d610404 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Wed, 24 Feb 2016 17:14:59 +0100 Subject: [core] explicitly initialize a few fields to null --- include/mbgl/platform/default/headless_display.hpp | 2 +- include/mbgl/platform/default/headless_view.hpp | 2 +- include/mbgl/style/types.hpp | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/mbgl/platform/default/headless_display.hpp b/include/mbgl/platform/default/headless_display.hpp index 4b160ddc68..80a0c31af3 100644 --- a/include/mbgl/platform/default/headless_display.hpp +++ b/include/mbgl/platform/default/headless_display.hpp @@ -11,7 +11,7 @@ public: ~HeadlessDisplay(); #if MBGL_USE_CGL - CGLPixelFormatObj pixelFormat; + CGLPixelFormatObj pixelFormat = nullptr; #endif #if MBGL_USE_GLX diff --git a/include/mbgl/platform/default/headless_view.hpp b/include/mbgl/platform/default/headless_view.hpp index 8f8d11b297..8347aa51fe 100644 --- a/include/mbgl/platform/default/headless_view.hpp +++ b/include/mbgl/platform/default/headless_view.hpp @@ -54,7 +54,7 @@ private: std::shared_ptr display; const float pixelRatio; std::array dimensions; - bool needsResize; + bool needsResize = false; #if MBGL_USE_CGL CGLContextObj glContext = nullptr; diff --git a/include/mbgl/style/types.hpp b/include/mbgl/style/types.hpp index 38915db7d8..97a648210a 100644 --- a/include/mbgl/style/types.hpp +++ b/include/mbgl/style/types.hpp @@ -18,10 +18,10 @@ struct Faded { Faded(const T& v) : to(v) {} T from; - float fromScale; + float fromScale = 0; T to; - float toScale; - float t; + float toScale = 0; + float t = 0; }; // ------------------------------------------------------------------------------------------------- -- cgit v1.2.1