diff options
-rw-r--r-- | include/mbgl/platform/default/headless_display.hpp | 2 | ||||
-rw-r--r-- | include/mbgl/platform/default/headless_view.hpp | 2 | ||||
-rw-r--r-- | include/mbgl/style/types.hpp | 6 | ||||
-rw-r--r-- | src/mbgl/renderer/painter.hpp | 6 | ||||
-rw-r--r-- | src/mbgl/util/thread.hpp | 4 | ||||
-rw-r--r-- | test/storage/offline_database.cpp | 4 |
6 files changed, 12 insertions, 12 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; }; // ------------------------------------------------------------------------------------------------- diff --git a/src/mbgl/renderer/painter.hpp b/src/mbgl/renderer/painter.hpp index 83d051359b..4a07d651d1 100644 --- a/src/mbgl/renderer/painter.hpp +++ b/src/mbgl/renderer/painter.hpp @@ -161,9 +161,9 @@ private: float depthRangeSize; const float depthEpsilon = 1.0f / (1 << 16); - SpriteAtlas* spriteAtlas; - GlyphAtlas* glyphAtlas; - LineAtlas* lineAtlas; + SpriteAtlas* spriteAtlas = nullptr; + GlyphAtlas* glyphAtlas = nullptr; + LineAtlas* lineAtlas = nullptr; FrameHistory frameHistory; diff --git a/src/mbgl/util/thread.hpp b/src/mbgl/util/thread.hpp index a7a5e73782..d05748a003 100644 --- a/src/mbgl/util/thread.hpp +++ b/src/mbgl/util/thread.hpp @@ -81,8 +81,8 @@ private: std::thread thread; - Object* object; - RunLoop* loop; + Object* object = nullptr; + RunLoop* loop = nullptr; }; template <class Object> diff --git a/test/storage/offline_database.cpp b/test/storage/offline_database.cpp index 82e07c208a..23269a98ed 100644 --- a/test/storage/offline_database.cpp +++ b/test/storage/offline_database.cpp @@ -72,7 +72,7 @@ public: } private: - sqlite3* db; + sqlite3* db = nullptr; bool locked = false; }; @@ -115,7 +115,7 @@ TEST(OfflineDatabase, SchemaVersion) { std::string path("test/fixtures/database/offline.db"); { - sqlite3* db; + sqlite3* db = nullptr; sqlite3_open_v2(path.c_str(), &db, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, nullptr); sqlite3_exec(db, "PRAGMA user_version = 1", nullptr, nullptr, nullptr); sqlite3_close_v2(db); |