diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-01-17 11:53:11 +0100 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-01-17 17:39:54 +0100 |
commit | 54d937c738389d25a7d296f26eadae9be4ea3298 (patch) | |
tree | 0cdd6e61662bb99562cb341d5c2b425d1143359d | |
parent | 1fc81594816289ad06d608199363cd6b668afc72 (diff) | |
download | qtlocation-mapboxgl-54d937c738389d25a7d296f26eadae9be4ea3298.tar.gz |
[core] Use std::tie in Source::Impl::queryRenderedFeatures sort
-rw-r--r-- | src/mbgl/style/source_impl.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mbgl/style/source_impl.cpp b/src/mbgl/style/source_impl.cpp index 149bf99f9d..624fee8ee5 100644 --- a/src/mbgl/style/source_impl.cpp +++ b/src/mbgl/style/source_impl.cpp @@ -217,9 +217,8 @@ std::unordered_map<std::string, std::vector<Feature>> Source::Impl::queryRendere auto sortRenderTiles = [](const RenderTile& a, const RenderTile& b) { - return a.id.canonical.z != b.id.canonical.z ? a.id.canonical.z < b.id.canonical.z : - a.id.canonical.y != b.id.canonical.y ? a.id.canonical.y < b.id.canonical.y : - a.id.wrap != b.id.wrap ? a.id.wrap < b.id.wrap : a.id.canonical.x < b.id.canonical.x; + return std::tie(a.id.canonical.z, a.id.canonical.y, a.id.wrap, a.id.canonical.x) < + std::tie(b.id.canonical.z, b.id.canonical.y, b.id.wrap, b.id.canonical.x); }; std::vector<std::reference_wrapper<const RenderTile>> sortedTiles; std::transform(renderTiles.cbegin(), renderTiles.cend(), std::back_inserter(sortedTiles), |