remove uneeded shared_ptr copy
This commit is contained in:
parent
93995d7c4b
commit
76e108ff9d
2 changed files with 6 additions and 6 deletions
|
@ -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
|
text_placement_info_ptr text_placements_list::get_placement_info(double scale_factor) const
|
||||||
{
|
{
|
||||||
return text_placement_info_ptr(
|
return boost::make_shared<text_placement_info_list>(this, scale_factor);
|
||||||
boost::make_shared<text_placement_info_list>(this, scale_factor));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
text_placements_list::text_placements_list() : text_placements(), list_(0)
|
text_placements_list::text_placements_list() : text_placements(), list_(0)
|
||||||
|
|
|
@ -103,8 +103,7 @@ bool text_placement_info_simple::next_position_only()
|
||||||
text_placement_info_ptr text_placements_simple::get_placement_info(
|
text_placement_info_ptr text_placements_simple::get_placement_info(
|
||||||
double scale_factor) const
|
double scale_factor) const
|
||||||
{
|
{
|
||||||
return text_placement_info_ptr(
|
return boost::make_shared<text_placement_info_simple>(this, scale_factor);
|
||||||
boost::make_shared<text_placement_info_simple>(this, scale_factor));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Position string: [POS][SIZE]
|
/** 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)]),
|
(direction_name[push_back(phoenix::ref(direction_), _1)] % ',') >> *(',' >> qi::float_[push_back(phoenix::ref(text_sizes_), _1)]),
|
||||||
space
|
space
|
||||||
);
|
);
|
||||||
if (first != last) {
|
if (first != last)
|
||||||
|
{
|
||||||
std::cerr << "WARNING: Could not parse text_placement_simple placement string ('" << positions << "').\n";
|
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";
|
std::cerr << "WARNING: text_placements_simple with no valid placements! ('"<< positions<<"')\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue