From b97f40469b6f3d386ae93bc9a23722ff017162f0 Mon Sep 17 00:00:00 2001 From: Alexander Shalamov Date: Sat, 15 Feb 2020 01:38:45 +0200 Subject: [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. --- src/mbgl/style/image_impl.hpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mbgl/style/image_impl.hpp') 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>; using ImageDependencies = std::unordered_map; using ImageRequestPair = std::pair; using ImageVersionMap = std::unordered_map; +inline bool operator<(const Immutable& a, const Immutable& b) { + return a->id < b->id; +} } // namespace mbgl -- cgit v1.2.1