summaryrefslogtreecommitdiff
path: root/src/mbgl/tile
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2017-01-17 11:53:43 +0100
committerBruno de Oliveira Abinader <bruno@mapbox.com>2017-01-17 17:39:54 +0100
commit884719269463951ed3860b36236ff19d156398cc (patch)
tree289531407d1f7922cc095f93bced886ea48e340f /src/mbgl/tile
parent54d937c738389d25a7d296f26eadae9be4ea3298 (diff)
downloadqtlocation-mapboxgl-884719269463951ed3860b36236ff19d156398cc.tar.gz
[core] Use std::tie in *TileID operator<
Diffstat (limited to 'src/mbgl/tile')
-rw-r--r--src/mbgl/tile/tile_id.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mbgl/tile/tile_id.hpp b/src/mbgl/tile/tile_id.hpp
index c95810342b..6415debfdc 100644
--- a/src/mbgl/tile/tile_id.hpp
+++ b/src/mbgl/tile/tile_id.hpp
@@ -108,7 +108,7 @@ inline bool CanonicalTileID::operator!=(const CanonicalTileID& rhs) const {
}
inline bool CanonicalTileID::operator<(const CanonicalTileID& rhs) const {
- return z != rhs.z ? z < rhs.z : x != rhs.x ? x < rhs.x : y < rhs.y;
+ return std::tie(z, x, y) < std::tie(rhs.z, rhs.x, rhs.y);
}
inline bool CanonicalTileID::isChildOf(const CanonicalTileID& parent) const {
@@ -170,7 +170,7 @@ inline bool OverscaledTileID::operator!=(const OverscaledTileID& rhs) const {
}
inline bool OverscaledTileID::operator<(const OverscaledTileID& rhs) const {
- return overscaledZ != rhs.overscaledZ ? overscaledZ < rhs.overscaledZ : canonical < rhs.canonical;
+ return std::tie(overscaledZ, canonical) < std::tie(rhs.overscaledZ, rhs.canonical);
}
inline uint32_t OverscaledTileID::overscaleFactor() const {
@@ -211,7 +211,7 @@ inline bool UnwrappedTileID::operator!=(const UnwrappedTileID& rhs) const {
}
inline bool UnwrappedTileID::operator<(const UnwrappedTileID& rhs) const {
- return wrap != rhs.wrap ? wrap < rhs.wrap : canonical < rhs.canonical;
+ return std::tie(wrap, canonical) < std::tie(rhs.wrap, rhs.canonical);
}
inline bool UnwrappedTileID::isChildOf(const UnwrappedTileID& parent) const {