From 31b8461d3417235cd953e7c0ed27e380b9a6569d Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Sun, 12 Jun 2016 23:25:54 +0300 Subject: [PATCH] [tidy] Check misc-static-assert Ref: http://clang.llvm.org/extra/clang-tidy/checks/misc-static-assert.html --- src/mbgl/gl/object_store.hpp | 3 +-- 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 9f82c5a95..956d65bda 100644 --- a/src/mbgl/gl/object_store.hpp +++ b/src/mbgl/gl/object_store.hpp @@ -7,7 +7,6 @@ #include #include -#include #include #include @@ -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 9e90c97db..b5462e837 100644 --- a/src/mbgl/gl/texture_pool.cpp +++ b/src/mbgl/gl/texture_pool.cpp @@ -2,6 +2,7 @@ #include #include +#include #include namespace mbgl {