summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-07-04 18:26:50 +0200
committerKonstantin Käfer <mail@kkaefer.com>2017-07-06 12:32:54 +0200
commit107622a72ba6929bdd70e42d96c16b62c9f65dd7 (patch)
treecc24f68de0b8171c8454651ce63524cb049a6f81
parent6d526c7b1dad81c8da1cf0d221d0b83ed2be9862 (diff)
downloadqtlocation-mapboxgl-107622a72ba6929bdd70e42d96c16b62c9f65dd7.tar.gz
[core] don't use unordered_* collections for things we need to sort anyway
-rw-r--r--src/mbgl/algorithm/generate_clip_ids.hpp8
-rw-r--r--test/algorithm/generate_clip_ids.test.cpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/mbgl/algorithm/generate_clip_ids.hpp b/src/mbgl/algorithm/generate_clip_ids.hpp
index c4d332343b..8338c7c145 100644
--- a/src/mbgl/algorithm/generate_clip_ids.hpp
+++ b/src/mbgl/algorithm/generate_clip_ids.hpp
@@ -3,9 +3,9 @@
#include <mbgl/tile/tile_id.hpp>
#include <mbgl/util/clip_id.hpp>
-#include <unordered_set>
+#include <set>
#include <vector>
-#include <unordered_map>
+#include <map>
namespace mbgl {
namespace algorithm {
@@ -17,12 +17,12 @@ private:
void add(const CanonicalTileID &p);
bool operator==(const Leaf &other) const;
- std::unordered_set<CanonicalTileID> children;
+ std::set<CanonicalTileID> children;
ClipID& clip;
};
uint8_t bit_offset = 0;
- std::unordered_multimap<UnwrappedTileID, Leaf> pool;
+ std::multimap<UnwrappedTileID, Leaf> pool;
public:
template <typename Renderable>
diff --git a/test/algorithm/generate_clip_ids.test.cpp b/test/algorithm/generate_clip_ids.test.cpp
index 730dc7b7f3..404ab79912 100644
--- a/test/algorithm/generate_clip_ids.test.cpp
+++ b/test/algorithm/generate_clip_ids.test.cpp
@@ -10,7 +10,7 @@ struct Renderable {
bool used = true;
bool operator==(const Renderable& rhs) const {
- return clip == rhs.clip;
+ return id == rhs.id && clip == rhs.clip;
}
};