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

[core] Expose Source::getZoomRange - #8472

Merged
brunoabinader merged 1 commit into
masterfrom
source-getzoomrange
Mar 20, 2017
Merged

brunoabinader merged 1 commit into
masterfrom
source-getzoomrange

Conversation

@brunoabinader

Copy link
Copy Markdown
Contributor

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
Copy Markdown

@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

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

@jfirebaugh jfirebaugh Mar 20, 2017 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor 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