summaryrefslogtreecommitdiff
path: root/src/mbgl/text/glyph_range.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/text/glyph_range.hpp')
-rw-r--r--src/mbgl/text/glyph_range.hpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/mbgl/text/glyph_range.hpp b/src/mbgl/text/glyph_range.hpp
index 74afb73dfc..35a1f74b94 100644
--- a/src/mbgl/text/glyph_range.hpp
+++ b/src/mbgl/text/glyph_range.hpp
@@ -3,21 +3,24 @@
#include <utility>
#include <cstdint>
#include <unordered_set>
-#include <boost/functional/hash.hpp>
+#include <mbgl/util/hash.hpp>
namespace mbgl {
using GlyphRange = std::pair<uint16_t, uint16_t>;
-struct GlyphRangeHash {
- std::size_t operator()(const GlyphRange& glyphRange) const {
- return boost::hash_value(glyphRange);
- }
-};
-
-using GlyphRangeSet = std::unordered_set<GlyphRange, GlyphRangeHash>;
-
constexpr uint32_t GLYPHS_PER_GLYPH_RANGE = 256;
constexpr uint32_t GLYPH_RANGES_PER_FONT_STACK = 256;
} // end namespace mbgl
+
+namespace std {
+
+template <>
+struct hash<mbgl::GlyphRange> {
+ std::size_t operator()(const mbgl::GlyphRange& range) const {
+ return mbgl::util::hash(range.first, range.second);
+ }
+};
+
+} // namespace std