summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzmiao <zmiao.jamie@gmail.com>2019-09-17 16:09:03 +0300
committerzmiao <zmiao.jamie@gmail.com>2019-09-17 16:09:03 +0300
commit1e305d14d3261dd96c624c863971e50a2592c985 (patch)
treeaa9b536983b724cf9ce1022c9ce4af13b973118d
parent8d06c962d7a20adda2f659cb9c8a36c47c5d2528 (diff)
downloadqtlocation-mapboxgl-upstream/zmiao-fix-maxzoom.tar.gz
[Core] fix clang-tidy reported errorupstream/zmiao-fix-maxzoom
-rw-r--r--src/mbgl/style/sources/vector_source.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mbgl/style/sources/vector_source.cpp b/src/mbgl/style/sources/vector_source.cpp
index 3633cd6070..a69ff632d8 100644
--- a/src/mbgl/style/sources/vector_source.cpp
+++ b/src/mbgl/style/sources/vector_source.cpp
@@ -63,8 +63,12 @@ void VectorSource::loadDescription(FileSource& fileSource) {
observer->onSourceError(*this, std::make_exception_ptr(util::StyleParseException(error.message)));
return;
}
- if (maxZoom) tileset->zoomRange.max = *maxZoom;
- if (minZoom) tileset->zoomRange.min = *minZoom;
+ if (maxZoom) {
+ tileset->zoomRange.max = *maxZoom;
+ }
+ if (minZoom) {
+ tileset->zoomRange.min = *minZoom;
+ }
util::mapbox::canonicalizeTileset(*tileset, url, getType(), util::tileSize);
bool changed = impl().tileset != *tileset;