diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-01-17 11:57:27 +0100 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-01-17 17:39:54 +0100 |
commit | 4439aecbcc21aae8b71c9b9a0bd65d9d128d6c83 (patch) | |
tree | f45c020fb685eeb576248067a28a206dabeebf48 /src/mbgl/util | |
parent | 884719269463951ed3860b36236ff19d156398cc (diff) | |
download | qtlocation-mapboxgl-4439aecbcc21aae8b71c9b9a0bd65d9d128d6c83.tar.gz |
[core] Use std::tie in tileCover sort
Diffstat (limited to 'src/mbgl/util')
-rw-r--r-- | src/mbgl/util/tile_cover.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mbgl/util/tile_cover.cpp b/src/mbgl/util/tile_cover.cpp index 2fb7371aba..7699739588 100644 --- a/src/mbgl/util/tile_cover.cpp +++ b/src/mbgl/util/tile_cover.cpp @@ -109,8 +109,7 @@ std::vector<UnwrappedTileID> tileCover(const Point<double>& tl, // Sort first by distance, then by x/y. std::sort(t.begin(), t.end(), [](const ID& a, const ID& b) { - return (a.sqDist != b.sqDist) ? (a.sqDist < b.sqDist) - : ((a.x != b.x) ? (a.x < b.x) : (a.y < b.y)); + return std::tie(a.sqDist, a.x, a.y) < std::tie(b.sqDist, b.x, b.y); }); // Erase duplicate tile IDs (they typically occur at the common side of both triangles). |