Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

[core] Expose Source::getZoomRange #8472

Merged
merged 1 commit into from
Mar 20, 2017
Merged

Conversation

brunoabinader
Copy link
Member

Expose Source::getZoomRange as part of Source public API, also marking it const.

Part of #6584.

@brunoabinader brunoabinader added Core The cross-platform C++ core, aka mbgl feature labels Mar 20, 2017
@mention-bot
Copy link

@brunoabinader, thanks for your PR! By analyzing this pull request, we identified @jfirebaugh, @mourner and @1ec5 to be potential reviewers.

@brunoabinader brunoabinader merged commit 24198eb into master Mar 20, 2017
@brunoabinader brunoabinader deleted the source-getzoomrange branch March 20, 2017 16:25
@@ -153,7 +153,7 @@ void GeoJSONSource::Impl::loadDescription(FileSource& fileSource) {
});
}

Range<uint8_t> GeoJSONSource::Impl::getZoomRange() {
Range<uint8_t> GeoJSONSource::Impl::getZoomRange() const {
assert(loaded);
Copy link
Contributor

@jfirebaugh jfirebaugh Mar 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As hinted at more generally in the second point of this comment, this assert (and the equivalent one in TileSourceImpl) is likely to get triggered if we start using getZoomRange more widely. It may need to return optional<Range<uint8_t>>, so that callers are aware of the possibility of absence.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👉 #8486

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Core The cross-platform C++ core, aka mbgl feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants