summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2016-06-12 23:25:54 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2016-06-13 23:32:06 +0300
commit31b8461d3417235cd953e7c0ed27e380b9a6569d (patch)
treec32200ffe91eaebda861f5a284a578c23d8cbbee
parentc81e228c26457c24a2e3d99765c7a8735ec5a32c (diff)
downloadqtlocation-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.hpp3
-rw-r--r--src/mbgl/gl/texture_pool.cpp1
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 {