back to using shared_ptr for holding text_placement_info
This commit is contained in:
parent
a24b29624a
commit
1f29ce7d3d
4 changed files with 7 additions and 7 deletions
|
@ -61,7 +61,7 @@ public:
|
|||
|
||||
};
|
||||
|
||||
using text_placement_info_ptr = std::unique_ptr<text_placement_info>;
|
||||
using text_placement_info_ptr = std::shared_ptr<text_placement_info>;
|
||||
|
||||
// This object handles the management of all TextSymbolizer properties. It can
|
||||
// be used as a base class for own objects which implement new processing
|
||||
|
|
|
@ -21,10 +21,10 @@
|
|||
*****************************************************************************/
|
||||
|
||||
#include <mapnik/text/placements/dummy.hpp>
|
||||
#include <mapnik/make_unique.hpp>
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
||||
bool text_placement_info_dummy::next()
|
||||
{
|
||||
if (state) return false;
|
||||
|
@ -35,7 +35,7 @@ bool text_placement_info_dummy::next()
|
|||
text_placement_info_ptr text_placements_dummy::get_placement_info(
|
||||
double scale_factor) const
|
||||
{
|
||||
return std::make_unique<text_placement_info_dummy>(this, scale_factor);
|
||||
return std::make_shared<text_placement_info_dummy>(this, scale_factor);
|
||||
}
|
||||
|
||||
} //ns mapnik
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
//mapnik
|
||||
#include <mapnik/text/placements/list.hpp>
|
||||
#include <mapnik/xml_node.hpp>
|
||||
#include <mapnik/make_unique.hpp>
|
||||
|
||||
//boost
|
||||
#include <boost/property_tree/ptree.hpp>
|
||||
|
||||
|
@ -67,7 +67,7 @@ text_symbolizer_properties & text_placements_list::get(unsigned i)
|
|||
|
||||
text_placement_info_ptr text_placements_list::get_placement_info(double scale_factor) const
|
||||
{
|
||||
return std::make_unique<text_placement_info_list>(this, scale_factor);
|
||||
return std::make_shared<text_placement_info_list>(this, scale_factor);
|
||||
}
|
||||
|
||||
text_placements_list::text_placements_list()
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <mapnik/text/placements/simple.hpp>
|
||||
#include <mapnik/ptree_helpers.hpp>
|
||||
#include <mapnik/xml_node.hpp>
|
||||
#include <mapnik/make_unique.hpp>
|
||||
|
||||
// boost
|
||||
#include <boost/spirit/include/qi.hpp>
|
||||
#include <boost/spirit/include/phoenix_core.hpp>
|
||||
|
@ -72,7 +72,7 @@ bool text_placement_info_simple::next_position_only()
|
|||
|
||||
text_placement_info_ptr text_placements_simple::get_placement_info(double scale_factor) const
|
||||
{
|
||||
return std::make_unique<text_placement_info_simple>(this, scale_factor);
|
||||
return std::make_shared<text_placement_info_simple>(this, scale_factor);
|
||||
}
|
||||
|
||||
// Position string: [POS][SIZE]
|
||||
|
|
Loading…
Add table
Reference in a new issue