summaryrefslogtreecommitdiff
path: root/src/mbgl
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl')
-rw-r--r--src/mbgl/util/tile_cover.cpp3
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).