summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-02-24 17:14:59 +0100
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-03-04 16:01:41 -0800
commit8112ac3371230d0d99733c4b71fb2fac3d610404 (patch)
tree4bc0abb7e48f4b675e98d9a392a29deb8e6285fe /include
parent661e9e7f49d6aadbd9c14a99b213d8fa0653b469 (diff)
downloadqtlocation-mapboxgl-8112ac3371230d0d99733c4b71fb2fac3d610404.tar.gz
[core] explicitly initialize a few fields to null
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/platform/default/headless_display.hpp2
-rw-r--r--include/mbgl/platform/default/headless_view.hpp2
-rw-r--r--include/mbgl/style/types.hpp6
3 files changed, 5 insertions, 5 deletions
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<HeadlessDisplay> display;
const float pixelRatio;
std::array<uint16_t, 2> 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;
};
// -------------------------------------------------------------------------------------------------