c++ style
This commit is contained in:
parent
fb3d9cd7b6
commit
72fd012221
5 changed files with 7 additions and 15 deletions
|
@ -59,9 +59,7 @@ void format_node::to_xml(ptree & xml) const
|
|||
|
||||
node_ptr format_node::from_xml(xml_node const& xml)
|
||||
{
|
||||
format_node *n = new format_node();
|
||||
node_ptr np(n);
|
||||
|
||||
auto n = std::make_shared<format_node>();
|
||||
node_ptr child = node::from_xml(xml);
|
||||
n->set_child(child);
|
||||
|
||||
|
@ -80,7 +78,7 @@ node_ptr format_node::from_xml(xml_node const& xml)
|
|||
set_property_from_xml<text_transform_e>(n->text_transform, "text-transform", xml);
|
||||
|
||||
n->face_name = xml.get_opt_attr<std::string>("face-name");
|
||||
return np;
|
||||
return n;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -61,8 +61,7 @@ void layout_node::to_xml(ptree &xml) const
|
|||
|
||||
node_ptr layout_node::from_xml(xml_node const& xml)
|
||||
{
|
||||
std::shared_ptr<layout_node> n = std::make_shared<layout_node>();
|
||||
|
||||
auto n = std::make_shared<layout_node>();
|
||||
node_ptr child = node::from_xml(xml);
|
||||
n->set_child(child);
|
||||
|
||||
|
|
|
@ -38,10 +38,9 @@ namespace formatting
|
|||
|
||||
using boost::property_tree::ptree;
|
||||
|
||||
void text_node::to_xml(ptree &xml) const
|
||||
void text_node::to_xml(ptree & xml) const
|
||||
{
|
||||
ptree &new_node = xml.push_back(ptree::value_type(
|
||||
"<xmltext>", ptree()))->second;
|
||||
ptree & new_node = xml.push_back(ptree::value_type("<xmltext>", ptree()))->second;
|
||||
new_node.put_value(to_expression_string(*text_));
|
||||
}
|
||||
|
||||
|
|
|
@ -37,10 +37,6 @@ void text_placements::add_expressions(expression_set & output) const
|
|||
text_placement_info::text_placement_info(text_placements const* parent,
|
||||
double scale_factor_)
|
||||
: properties(parent->defaults),
|
||||
scale_factor(scale_factor_)
|
||||
{
|
||||
//properties.format = std::make_shared<char_properties>(*(properties.format));
|
||||
//properties.layout_defaults = std::make_shared<text_layout_properties>(*(properties.layout_defaults));
|
||||
}
|
||||
scale_factor(scale_factor_) {}
|
||||
|
||||
} //ns mapnik
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace mapnik
|
|||
bool text_placement_info_dummy::next()
|
||||
{
|
||||
if (state) return false;
|
||||
state++;
|
||||
++state;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue