From e5c182591ae0ce8f2339b29f160f393b333f6f55 Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Mon, 1 Feb 2021 10:57:52 +0000 Subject: [PATCH] use unordered_map for proj_transform caching --- include/mapnik/map.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/mapnik/map.hpp b/include/mapnik/map.hpp index b53c26a11..e3837ee9d 100644 --- a/include/mapnik/map.hpp +++ b/include/mapnik/map.hpp @@ -41,7 +41,7 @@ MAPNIK_DISABLE_WARNING_PUSH MAPNIK_DISABLE_WARNING_POP // stl -#include +#include #include #include #include @@ -57,6 +57,7 @@ class layer; class MAPNIK_DECL Map : boost::equality_comparable { + using proj_cache_type = std::unordered_map>; public: enum aspect_fix_mode @@ -104,7 +105,7 @@ private: boost::optional font_directory_; freetype_engine::font_file_mapping_type font_file_mapping_; freetype_engine::font_memory_cache_type font_memory_cache_; - mutable std::map> proj_cache_; + mutable proj_cache_type proj_cache_; public: using const_style_iterator = std::map::const_iterator; @@ -502,7 +503,7 @@ public: { return font_memory_cache_; } - std::map> & proj_cache() const + proj_cache_type& proj_cache() const { return proj_cache_; }