summaryrefslogtreecommitdiff
path: root/src/mbgl/annotation
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2017-03-21 16:28:11 +0200
committerBruno de Oliveira Abinader <bruno@mapbox.com>2017-03-21 19:33:36 +0200
commit1f8910de186f35216791a17a683a55f01031ec81 (patch)
treeee470e8e1ee6f85094afce6d1a227018b9780eb6 /src/mbgl/annotation
parent86cddaf751e4c66f117b28fb013a43486581c948 (diff)
downloadqtlocation-mapboxgl-1f8910de186f35216791a17a683a55f01031ec81.tar.gz
Make Source::getZoomRange return an optional range
Diffstat (limited to 'src/mbgl/annotation')
-rw-r--r--src/mbgl/annotation/annotation_source.cpp4
-rw-r--r--src/mbgl/annotation/annotation_source.hpp3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/mbgl/annotation/annotation_source.cpp b/src/mbgl/annotation/annotation_source.cpp
index 7434029c4b..c52836c500 100644
--- a/src/mbgl/annotation/annotation_source.cpp
+++ b/src/mbgl/annotation/annotation_source.cpp
@@ -14,8 +14,8 @@ AnnotationSource::Impl::Impl(Source& base_)
: Source::Impl(SourceType::Annotations, AnnotationManager::SourceID, base_) {
}
-Range<uint8_t> AnnotationSource::Impl::getZoomRange() const {
- return { 0, 22 };
+optional<Range<uint8_t>> AnnotationSource::Impl::getZoomRange() const {
+ return { { 0, 22 } };
}
void AnnotationSource::Impl::loadDescription(FileSource&) {
diff --git a/src/mbgl/annotation/annotation_source.hpp b/src/mbgl/annotation/annotation_source.hpp
index 62d1aa3488..07e00dc52d 100644
--- a/src/mbgl/annotation/annotation_source.hpp
+++ b/src/mbgl/annotation/annotation_source.hpp
@@ -18,9 +18,10 @@ public:
void loadDescription(FileSource&) final;
+ optional<Range<uint8_t>> getZoomRange() const final;
+
private:
uint16_t getTileSize() const final { return util::tileSize; }
- Range<uint8_t> getZoomRange() const final;
std::unique_ptr<Tile> createTile(const OverscaledTileID&, const style::UpdateParameters&) final;
};