[tidy] Check misc-static-assert
Ref: http://clang.llvm.org/extra/clang-tidy/checks/misc-static-assert.html
This commit is contained in:
@@ -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 } };
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include <mbgl/gl/object_store.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <vector>
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
Reference in New Issue
Block a user