summaryrefslogtreecommitdiff
path: root/src/mbgl/style/image_impl.hpp
diff options
context:
space:
mode:
authorAlexander Shalamov <alexander.shalamov@mapbox.com>2020-02-15 01:38:45 +0200
committerAlexander Shalamov <alexander.shalamov@mapbox.com>2020-02-17 10:14:05 +0200
commitb97f40469b6f3d386ae93bc9a23722ff017162f0 (patch)
treea94e1b72152429176b30c33d1c83fea877960204 /src/mbgl/style/image_impl.hpp
parent02274e76019bcfb938f50cdb638eca49c33de786 (diff)
downloadqtlocation-mapboxgl-b97f40469b6f3d386ae93bc9a23722ff017162f0.tar.gz
[core] Fix sprite sheet merging in Style::Impl::onSpriteLoaded
If we get a new sprite sheet from the server, we need to merge current sprite sheet with a new one, while overwiting duplicates and keeping old unique images in a style.
Diffstat (limited to 'src/mbgl/style/image_impl.hpp')
-rw-r--r--src/mbgl/style/image_impl.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mbgl/style/image_impl.hpp b/src/mbgl/style/image_impl.hpp
index 76a68017e2..11ceab4838 100644
--- a/src/mbgl/style/image_impl.hpp
+++ b/src/mbgl/style/image_impl.hpp
@@ -48,5 +48,8 @@ using ImageMap = std::unordered_map<std::string, Immutable<style::Image::Impl>>;
using ImageDependencies = std::unordered_map<std::string, ImageType>;
using ImageRequestPair = std::pair<ImageDependencies, uint64_t>;
using ImageVersionMap = std::unordered_map<std::string, uint32_t>;
+inline bool operator<(const Immutable<mbgl::style::Image::Impl>& a, const Immutable<mbgl::style::Image::Impl>& b) {
+ return a->id < b->id;
+}
} // namespace mbgl