remove uneeded shared_ptr copy

This commit is contained in:
Dane Springmeyer 2012-03-13 07:58:38 -07:00
parent 93995d7c4b
commit 76e108ff9d
2 changed files with 6 additions and 6 deletions

View file

@ -63,8 +63,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 text_placement_info_ptr(
boost::make_shared<text_placement_info_list>(this, scale_factor));
return boost::make_shared<text_placement_info_list>(this, scale_factor);
}
text_placements_list::text_placements_list() : text_placements(), list_(0)

View file

@ -103,8 +103,7 @@ bool text_placement_info_simple::next_position_only()
text_placement_info_ptr text_placements_simple::get_placement_info(
double scale_factor) const
{
return text_placement_info_ptr(
boost::make_shared<text_placement_info_simple>(this, scale_factor));
return boost::make_shared<text_placement_info_simple>(this, scale_factor);
}
/** Position string: [POS][SIZE]
@ -145,10 +144,12 @@ void text_placements_simple::set_positions(std::string positions)
(direction_name[push_back(phoenix::ref(direction_), _1)] % ',') >> *(',' >> qi::float_[push_back(phoenix::ref(text_sizes_), _1)]),
space
);
if (first != last) {
if (first != last)
{
std::cerr << "WARNING: Could not parse text_placement_simple placement string ('" << positions << "').\n";
}
if (direction_.size() == 0) {
if (direction_.size() == 0)
{
std::cerr << "WARNING: text_placements_simple with no valid placements! ('"<< positions<<"')\n";
}
}