Skip to content

Commit

Permalink
Merge pull request mapnik#4219 from mathisloge/proj_transform_fix
Browse files Browse the repository at this point in the history
fixes proj_transform_cache incomplete type
  • Loading branch information
artemp authored Apr 1, 2021
2 parents 3787ad3 + 9155cd0 commit 3fd9459
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/mapnik/map.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class MAPNIK_DECL Map : boost::equality_comparable<Map>
boost::optional<std::string> font_directory_;
freetype_engine::font_file_mapping_type font_file_mapping_;
freetype_engine::font_memory_cache_type font_memory_cache_;
std::unique_ptr<proj_transform_cache> proj_cache_ = {};
std::unique_ptr<proj_transform_cache> proj_cache_;
public:
using const_style_iterator = std::map<std::string,feature_type_style>::const_iterator;
using style_iterator = std::map<std::string,feature_type_style>::iterator;
Expand Down
9 changes: 6 additions & 3 deletions src/map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ Map::Map()
extra_params_(),
font_directory_(),
font_file_mapping_(),
font_memory_cache_() {}
font_memory_cache_(),
proj_cache_(std::make_unique<proj_transform_cache>()) {}

Map::Map(int width,int height, std::string const& srs)
: width_(width),
Expand All @@ -90,7 +91,8 @@ Map::Map(int width,int height, std::string const& srs)
extra_params_(),
font_directory_(),
font_file_mapping_(),
font_memory_cache_() {}
font_memory_cache_(),
proj_cache_(std::make_unique<proj_transform_cache>()) {}

Map::Map(Map const& rhs)
: width_(rhs.width_),
Expand All @@ -112,7 +114,8 @@ Map::Map(Map const& rhs)
font_directory_(rhs.font_directory_),
font_file_mapping_(rhs.font_file_mapping_),
// on copy discard memory caches
font_memory_cache_()
font_memory_cache_(),
proj_cache_(std::make_unique<proj_transform_cache>())
{
init_proj_transforms();
}
Expand Down

0 comments on commit 3fd9459

Please sign in to comment.