Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

avoid constructing extra temp object

  • Loading branch information...
commit fb6bf401e9066d15342e189a7a23d05e373093a8 1 parent 42f9fe0
@springmeyer springmeyer authored
View
4 src/load_map.cpp
@@ -1336,7 +1336,7 @@ void map_parser::parse_text_symbolizer( rule & rule, ptree const & sym )
if (placement_type) {
placement_finder = placements::registry::instance()->from_xml(*placement_type, sym, fontsets_);
} else {
- placement_finder = text_placements_ptr(boost::make_shared<text_placements_dummy>());
+ placement_finder = boost::make_shared<text_placements_dummy>();
placement_finder->defaults.from_xml(sym, fontsets_);
}
if (strict_ &&
@@ -1379,7 +1379,7 @@ void map_parser::parse_shield_symbolizer( rule & rule, ptree const & sym )
if (placement_type) {
placement_finder = placements::registry::instance()->from_xml(*placement_type, sym, fontsets_);
} else {
- placement_finder = text_placements_ptr(boost::make_shared<text_placements_dummy>());
+ placement_finder = boost::make_shared<text_placements_dummy>();
}
placement_finder->defaults.from_xml(sym, fontsets_);
if (strict_ &&
View
3  src/text_placements/dummy.cpp
@@ -35,8 +35,7 @@ bool text_placement_info_dummy::next()
text_placement_info_ptr text_placements_dummy::get_placement_info(
double scale_factor) const
{
- return text_placement_info_ptr(boost::make_shared<text_placement_info_dummy>(
- this, scale_factor));
+ return boost::make_shared<text_placement_info_dummy>(this, scale_factor);
}
} //ns mapnik
View
4 src/text_placements/simple.cpp
@@ -169,8 +169,8 @@ std::string text_placements_simple::get_positions()
text_placements_ptr text_placements_simple::from_xml(boost::property_tree::ptree const &xml, fontset_map const & fontsets)
{
- text_placements_ptr ptr = text_placements_ptr(boost::make_shared<text_placements_simple>(
- get_attr<std::string>(xml, "placements", "X")));
+ text_placements_ptr ptr = boost::make_shared<text_placements_simple>(
+ get_attr<std::string>(xml, "placements", "X"));
ptr->defaults.from_xml(xml, fontsets);
return ptr;
}
Please sign in to comment.
Something went wrong with that request. Please try again.