diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-06-12 23:25:54 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-06-13 23:32:06 +0300 |
commit | 31b8461d3417235cd953e7c0ed27e380b9a6569d (patch) | |
tree | c32200ffe91eaebda861f5a284a578c23d8cbbee | |
parent | c81e228c26457c24a2e3d99765c7a8735ec5a32c (diff) | |
download | qtlocation-mapboxgl-31b8461d3417235cd953e7c0ed27e380b9a6569d.tar.gz |
[tidy] Check misc-static-assert
Ref: http://clang.llvm.org/extra/clang-tidy/checks/misc-static-assert.html
-rw-r--r-- | src/mbgl/gl/object_store.hpp | 3 | ||||
-rw-r--r-- | src/mbgl/gl/texture_pool.cpp | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/gl/object_store.hpp b/src/mbgl/gl/object_store.hpp index 9f82c5a95b..956d65bda1 100644 --- a/src/mbgl/gl/object_store.hpp +++ b/src/mbgl/gl/object_store.hpp @@ -7,7 +7,6 @@ #include <array> #include <algorithm> -#include <cassert> #include <memory> #include <vector> @@ -90,7 +89,7 @@ public: UniqueTexturePool createTexturePool() { ObjectPool ids; MBGL_CHECK_ERROR(glGenTextures(TextureMax, ids.data())); - assert(ids.size() == size_t(TextureMax)); + static_assert(ids.size() == size_t(TextureMax), "Texture ids size mismatch"); return UniqueTexturePool { std::move(ids), { this } }; } diff --git a/src/mbgl/gl/texture_pool.cpp b/src/mbgl/gl/texture_pool.cpp index 9e90c97db7..b5462e8378 100644 --- a/src/mbgl/gl/texture_pool.cpp +++ b/src/mbgl/gl/texture_pool.cpp @@ -2,6 +2,7 @@ #include <mbgl/gl/object_store.hpp> #include <algorithm> +#include <cassert> #include <vector> namespace mbgl { |