summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-11-15 19:47:43 +0200
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-11-15 19:47:43 +0200
commit6ff9d8ac626d08e46c57557463994e096ffc9c1b (patch)
tree0143bcdf99e4e223c0147fa34d932a1ba61cc40e
parent611d86438cd3efd4ba9b29a5cd125f50c9d442c0 (diff)
downloadqtlocation-mapboxgl-upstream/lp-blinking-route-downstream.tar.gz
[core] Sort style sources before orchestrationupstream/lp-blinking-route-downstream
-rw-r--r--src/mbgl/style/style_impl.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mbgl/style/style_impl.cpp b/src/mbgl/style/style_impl.cpp
index 95a39819fc..6aa80d3802 100644
--- a/src/mbgl/style/style_impl.cpp
+++ b/src/mbgl/style/style_impl.cpp
@@ -347,7 +347,13 @@ Immutable<std::vector<Immutable<Image::Impl>>> Style::Impl::getImageImpls() cons
}
Immutable<std::vector<Immutable<Source::Impl>>> Style::Impl::getSourceImpls() const {
- return sources.getImpls();
+ auto impls = sources.getImpls();
+ mutate(impls, [&] (auto& impls_) {
+ std::sort(impls_.begin(), impls_.end(), [](const auto& a, const auto& b) {
+ return a->id < b->id;
+ });
+ });
+ return impls;
}
Immutable<std::vector<Immutable<Layer::Impl>>> Style::Impl::getLayerImpls() const {