summaryrefslogtreecommitdiff
path: root/src/mbgl/style
diff options
context:
space:
mode:
authorAlexander Shalamov <alexander.shalamov@mapbox.com>2019-09-23 15:42:06 +0300
committerAlexander Shalamov <alexander.shalamov@mapbox.com>2019-09-26 10:55:47 +0300
commit9c8295c6a64b6f5b2c9b67fd01633a156481a3c8 (patch)
tree27cbdbff1757d0e4aa88c3616f17233a143270e2 /src/mbgl/style
parent30ffbe9b8d49d8d8a2820f7b452ebc1d1531f298 (diff)
downloadqtlocation-mapboxgl-9c8295c6a64b6f5b2c9b67fd01633a156481a3c8.tar.gz
[core][android][darwin] Move platform specific Collator impls from expression
Platform specific Collator implementations should not be part of an expression APIs.
Diffstat (limited to 'src/mbgl/style')
-rw-r--r--src/mbgl/style/expression/collator.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/mbgl/style/expression/collator.cpp b/src/mbgl/style/expression/collator.cpp
new file mode 100644
index 0000000000..185d713150
--- /dev/null
+++ b/src/mbgl/style/expression/collator.cpp
@@ -0,0 +1,24 @@
+#include <mbgl/style/expression/collator.hpp>
+
+namespace mbgl {
+namespace style {
+namespace expression {
+
+Collator::Collator(bool caseSensitive, bool diacriticSensitive, optional<std::string> locale)
+ : collator(platform::Collator(caseSensitive, diacriticSensitive, std::move(locale))) {}
+
+bool Collator::operator==(const Collator& other) const {
+ return collator == other.collator;
+}
+
+int Collator::compare(const std::string& lhs, const std::string& rhs) const {
+ return collator.compare(lhs, rhs);
+}
+
+std::string Collator::resolvedLocale() const {
+ return collator.resolvedLocale();
+}
+
+} // namespace expression
+} // namespace style
+} // namespace mbgl