diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-06-13 14:45:22 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-06-14 11:25:45 -0700 |
commit | 6eab895bc0683881f793a3a751fa7470603ae9a0 (patch) | |
tree | 5e1b231702bb1c93e6a0c8823500a6e6980b0970 /platform/default/mbgl/storage/offline.cpp | |
parent | 615a6685a47609310930890203f41815a5f19d48 (diff) | |
download | qtlocation-mapboxgl-6eab895bc0683881f793a3a751fa7470603ae9a0.tar.gz |
[core] Use Range<uint8_t> instead of full Tileset where possible
Diffstat (limited to 'platform/default/mbgl/storage/offline.cpp')
-rw-r--r-- | platform/default/mbgl/storage/offline.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/default/mbgl/storage/offline.cpp b/platform/default/mbgl/storage/offline.cpp index 812e427157..fd2d47819b 100644 --- a/platform/default/mbgl/storage/offline.cpp +++ b/platform/default/mbgl/storage/offline.cpp @@ -23,9 +23,9 @@ OfflineTilePyramidRegionDefinition::OfflineTilePyramidRegionDefinition( } } -std::vector<CanonicalTileID> OfflineTilePyramidRegionDefinition::tileCover(SourceType type, uint16_t tileSize, const Tileset& tileset) const { - double minZ = std::max<double>(util::coveringZoomLevel(minZoom, type, tileSize), tileset.minZoom); - double maxZ = std::min<double>(util::coveringZoomLevel(maxZoom, type, tileSize), tileset.maxZoom); +std::vector<CanonicalTileID> OfflineTilePyramidRegionDefinition::tileCover(SourceType type, uint16_t tileSize, const Range<uint8_t>& zoomRange) const { + double minZ = std::max<double>(util::coveringZoomLevel(minZoom, type, tileSize), zoomRange.min); + double maxZ = std::min<double>(util::coveringZoomLevel(maxZoom, type, tileSize), zoomRange.max); assert(minZ >= 0); assert(maxZ >= 0); |