diff options
Diffstat (limited to 'src/mbgl/util')
-rw-r--r-- | src/mbgl/util/offscreen_texture.cpp | 4 | ||||
-rw-r--r-- | src/mbgl/util/tile_cover.cpp | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/mbgl/util/offscreen_texture.cpp b/src/mbgl/util/offscreen_texture.cpp index cbe33c8d58..56ef60b15c 100644 --- a/src/mbgl/util/offscreen_texture.cpp +++ b/src/mbgl/util/offscreen_texture.cpp @@ -9,7 +9,7 @@ namespace mbgl { class OffscreenTexture::Impl { public: Impl(gl::Context& context_, const Size size_) : context(context_), size(std::move(size_)) { - assert(size); + assert(!size.isEmpty()); } void bind() { @@ -45,7 +45,7 @@ private: OffscreenTexture::OffscreenTexture(gl::Context& context, const Size size) : impl(std::make_unique<Impl>(context, std::move(size))) { - assert(size); + assert(!size.isEmpty()); } OffscreenTexture::~OffscreenTexture() = default; diff --git a/src/mbgl/util/tile_cover.cpp b/src/mbgl/util/tile_cover.cpp index 7699739588..b53e91162c 100644 --- a/src/mbgl/util/tile_cover.cpp +++ b/src/mbgl/util/tile_cover.cpp @@ -156,6 +156,8 @@ std::vector<UnwrappedTileID> tileCover(const LatLngBounds& bounds_, int32_t z) { } std::vector<UnwrappedTileID> tileCover(const TransformState& state, int32_t z) { + assert(state.valid()); + const double w = state.getSize().width; const double h = state.getSize().height; return tileCover( |