diff options
author | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2020-01-14 15:14:03 +0200 |
---|---|---|
committer | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2020-01-14 15:15:14 +0200 |
commit | 5de84bbb3d01e93c3f3e3b27956177d3e1e1d003 (patch) | |
tree | 332ac17b3ef4e319b9a90c9c681f726d70622b75 | |
parent | 6ddff19ceedb8f6cb095792b90121330afcc38cf (diff) | |
download | qtlocation-mapboxgl-5de84bbb3d01e93c3f3e3b27956177d3e1e1d003.tar.gz |
fix stuff
-rw-r--r-- | expression-test/test_runner_common.hpp | 1 | ||||
-rw-r--r-- | include/mbgl/style/expression/formatted.hpp | 1 | ||||
-rw-r--r-- | include/mbgl/style/expression/image.hpp | 1 | ||||
-rw-r--r-- | src/mbgl/gfx/attribute.hpp | 4 | ||||
-rw-r--r-- | src/mbgl/style/expression/formatted.cpp | 4 | ||||
-rw-r--r-- | src/mbgl/style/expression/image.cpp | 4 | ||||
-rw-r--r-- | src/mbgl/text/glyph_manager.cpp | 2 |
7 files changed, 15 insertions, 2 deletions
diff --git a/expression-test/test_runner_common.hpp b/expression-test/test_runner_common.hpp index b30d1a145c..499ae60e48 100644 --- a/expression-test/test_runner_common.hpp +++ b/expression-test/test_runner_common.hpp @@ -9,5 +9,4 @@ using namespace mbgl; Value stripPrecision(const Value& value); std::vector<std::string> tokenize(std::string str); -bool deepEqual(const Value& a, const Value& b); bool deepEqual(const optional<Value>& a, const optional<Value>& b); diff --git a/include/mbgl/style/expression/formatted.hpp b/include/mbgl/style/expression/formatted.hpp index d089e12d9d..80d01c338f 100644 --- a/include/mbgl/style/expression/formatted.hpp +++ b/include/mbgl/style/expression/formatted.hpp @@ -49,6 +49,7 @@ public: {} bool operator==(const Formatted& ) const; + bool operator!=(const Formatted& ) const; std::string toString() const; mbgl::Value toObject() const; diff --git a/include/mbgl/style/expression/image.hpp b/include/mbgl/style/expression/image.hpp index 0bc4794a24..5fa8e65065 100644 --- a/include/mbgl/style/expression/image.hpp +++ b/include/mbgl/style/expression/image.hpp @@ -18,6 +18,7 @@ public: Image(std::string imageID); explicit Image(std::string imageID, bool available); bool operator==(const Image&) const; + bool operator!=(const Image&) const; mbgl::Value toValue() const; const std::string& id() const; bool isAvailable() const; diff --git a/src/mbgl/gfx/attribute.hpp b/src/mbgl/gfx/attribute.hpp index ecb2b5e1b2..eeeae80417 100644 --- a/src/mbgl/gfx/attribute.hpp +++ b/src/mbgl/gfx/attribute.hpp @@ -95,6 +95,10 @@ public: lhs.vertexBufferResource == rhs.vertexBufferResource && lhs.vertexOffset == rhs.vertexOffset; } + + friend bool operator!=(const AttributeBinding& lhs, const AttributeBinding& rhs) { + return !(lhs == rhs); + } }; // Attribute binding requires member offsets. The only standard way to diff --git a/src/mbgl/style/expression/formatted.cpp b/src/mbgl/style/expression/formatted.cpp index 9041bb3121..8d6a7d072f 100644 --- a/src/mbgl/style/expression/formatted.cpp +++ b/src/mbgl/style/expression/formatted.cpp @@ -26,6 +26,10 @@ bool Formatted::operator==(const Formatted& other) const { return true; } +bool Formatted::operator!=(const Formatted& other) const { + return !(*this == other); +} + std::string Formatted::toString() const { std::string result; for (const auto& section : sections) { diff --git a/src/mbgl/style/expression/image.cpp b/src/mbgl/style/expression/image.cpp index 1dc7acde56..5b88c3f7c3 100644 --- a/src/mbgl/style/expression/image.cpp +++ b/src/mbgl/style/expression/image.cpp @@ -18,6 +18,10 @@ bool Image::operator==(const Image& other) const { return imageID == other.imageID && available == other.available; } +bool Image::operator!=(const Image& other) const { + return !(*this == other); +} + mbgl::Value Image::toValue() const { return mapbox::base::ValueObject{{"name", imageID}, {"available", available}}; } diff --git a/src/mbgl/text/glyph_manager.cpp b/src/mbgl/text/glyph_manager.cpp index 8caac1be31..b0cf411a0a 100644 --- a/src/mbgl/text/glyph_manager.cpp +++ b/src/mbgl/text/glyph_manager.cpp @@ -141,7 +141,7 @@ void GlyphManager::notify(GlyphRequestor& requestor, const GlyphDependencies& gl if (it != entry.glyphs.end()) { glyphs.emplace(*it); } else { - glyphs.emplace(glyphID, std::experimental::nullopt); + glyphs.emplace(glyphID, mbgl::nullopt); } } } |