diff --git a/include/mapnik/font_engine_freetype.hpp b/include/mapnik/font_engine_freetype.hpp index 5019b1363..a6cc7ea9c 100644 --- a/include/mapnik/font_engine_freetype.hpp +++ b/include/mapnik/font_engine_freetype.hpp @@ -49,7 +49,7 @@ namespace mapnik class stroker; using stroker_ptr = std::shared_ptr; class font_face_set; -using face_set_ptr = std::shared_ptr; +using face_set_ptr = std::unique_ptr; class font_face; using face_ptr = std::shared_ptr; diff --git a/include/mapnik/text/face.hpp b/include/mapnik/text/face.hpp index 0a4908ff0..78b2b74c6 100644 --- a/include/mapnik/text/face.hpp +++ b/include/mapnik/text/face.hpp @@ -98,7 +98,7 @@ public: private: std::vector faces_; }; -using face_set_ptr = std::shared_ptr; +using face_set_ptr = std::unique_ptr; // FT_Stroker wrapper diff --git a/src/font_engine_freetype.cpp b/src/font_engine_freetype.cpp index c5bc74051..a1d11fd7c 100644 --- a/src/font_engine_freetype.cpp +++ b/src/font_engine_freetype.cpp @@ -28,6 +28,7 @@ #include #include #include +#include // boost #include @@ -361,7 +362,7 @@ face_ptr face_manager::get_face(std::string const& name) template face_set_ptr face_manager::get_face_set(std::string const& name) { - face_set_ptr face_set = std::make_shared(); + face_set_ptr face_set = std::make_unique(); if (face_ptr face = get_face(name)) { face_set->add(face); @@ -373,7 +374,7 @@ template face_set_ptr face_manager::get_face_set(font_set const& fset) { std::vector const& names = fset.get_face_names(); - face_set_ptr face_set = std::make_shared(); + face_set_ptr face_set = std::make_unique(); for (auto const& name : names) { face_ptr face = get_face(name);