Compare commits

...

2 commits

Author SHA1 Message Date
artemp
eadd8b0297 fix : call make_shared 2015-07-15 16:59:52 +02:00
artemp
3dbe3644d8 use shared_ptr 2015-07-15 16:44:35 +02:00
3 changed files with 3 additions and 3 deletions

View file

@ -28,7 +28,7 @@
namespace mapnik { namespace detail {
struct evaluated_format_properties;
}
using evaluated_format_properties_ptr = std::unique_ptr<detail::evaluated_format_properties>;
using evaluated_format_properties_ptr = std::shared_ptr<detail::evaluated_format_properties>;
}
#endif // EVALUATED_FORMAT_PROPERTIES_PTR_HPP

View file

@ -54,7 +54,7 @@ struct glyph_info : util::noncopyable
glyph_info(glyph_info && rhs)
: glyph_index(std::move(rhs.glyph_index)),
char_index(std::move(rhs.char_index)),
format(rhs.format), // take ref
format(std::move(rhs.format)), //shared_ptr
face(std::move(rhs.face)), // shared_ptr move just ref counts, right?
unscaled_ymin(std::move(rhs.unscaled_ymin)),
unscaled_ymax(std::move(rhs.unscaled_ymax)),

View file

@ -169,7 +169,7 @@ void text_layout::add_child(text_layout_ptr const& child_layout)
evaluated_format_properties_ptr & text_layout::new_child_format_ptr(evaluated_format_properties_ptr const& p)
{
format_ptrs_.emplace_back(std::make_unique<detail::evaluated_format_properties>(*p));
format_ptrs_.emplace_back(std::make_shared<detail::evaluated_format_properties>(*p));
return format_ptrs_.back();
}