Permalink
Browse files

remove uneeded shared_ptr copy

  • Loading branch information...
1 parent 93995d7 commit 76e108ff9d49e96e6e622600669b2d5ee5c1c863 @springmeyer springmeyer committed Mar 13, 2012
Showing with 6 additions and 6 deletions.
  1. +1 −2 src/text_placements/list.cpp
  2. +5 −4 src/text_placements/simple.cpp
View
3 src/text_placements/list.cpp
@@ -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
9 src/text_placements/simple.cpp
@@ -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";
}
}

0 comments on commit 76e108f

Please sign in to comment.