diff --git a/include/mapnik/evaluate_global_attributes.hpp b/include/mapnik/evaluate_global_attributes.hpp index 18eaa436a..a73ac1262 100644 --- a/include/mapnik/evaluate_global_attributes.hpp +++ b/include/mapnik/evaluate_global_attributes.hpp @@ -43,8 +43,8 @@ struct evaluate_expression { using value_type = T; - explicit evaluate_expression(Attributes const& _attributes) - : attributes_(_attributes) {} + explicit evaluate_expression(Attributes const& attrs) + : attrs_(attrs) {} value_type operator() (attribute const&) const { @@ -53,8 +53,8 @@ struct evaluate_expression value_type operator() (global_attribute const& attr) const { - auto itr = attributes_.find(attr.name); - if (itr != attributes_.end()) + auto itr = attrs_.find(attr.name); + if (itr != attrs_.end()) { return itr->second; } @@ -129,7 +129,7 @@ struct evaluate_expression return value_type(val); } - Attributes const& attributes_; + Attributes const& attrs_; }; template @@ -221,7 +221,7 @@ struct evaluate_expression struct assign_value { template - static void apply(symbolizer_base::value_type & val, expression_ptr const& expr, Attributes const& attributes, property_types target ) + static void apply(symbolizer_base::value_type & val, expression_ptr const& expr, Attributes const& attrs, property_types target ) { switch (target) @@ -230,24 +230,24 @@ struct assign_value { // evaluate expression as a string then parse as css color std::string str = util::apply_visitor(mapnik::evaluate_expression(attributes),*expr).to_string(); + Attributes>(attrs),*expr).to_string(); try { val = parse_color(str); } catch (...) { val = color(0,0,0);} break; } case property_types::target_double: { - val = util::apply_visitor(mapnik::evaluate_expression(attributes),*expr).to_double(); + val = util::apply_visitor(mapnik::evaluate_expression(attrs),*expr).to_double(); break; } case property_types::target_integer: { - val = util::apply_visitor(mapnik::evaluate_expression(attributes),*expr).to_int(); + val = util::apply_visitor(mapnik::evaluate_expression(attrs),*expr).to_int(); break; } case property_types::target_bool: { - val = util::apply_visitor(mapnik::evaluate_expression(attributes),*expr).to_bool(); + val = util::apply_visitor(mapnik::evaluate_expression(attrs),*expr).to_bool(); break; } default: // no-op @@ -276,14 +276,14 @@ struct evaluate_global_attributes : util::noncopyable template struct evaluator { - evaluator(symbolizer_base::cont_type::value_type & prop, Attributes const& attributes) + evaluator(symbolizer_base::cont_type::value_type & prop, Attributes const& attrs) : prop_(prop), - attributes_(attributes) {} + attrs_(attrs) {} void operator() (expression_ptr const& expr) const { auto const& meta = get_meta(prop_.first); - assign_value::apply(prop_.second, expr, attributes_, std::get<2>(meta)); + assign_value::apply(prop_.second, expr, attrs_, std::get<2>(meta)); } template @@ -292,28 +292,28 @@ struct evaluate_global_attributes : util::noncopyable // no-op } symbolizer_base::cont_type::value_type & prop_; - Attributes const& attributes_; + Attributes const& attrs_; }; template struct extract_symbolizer { - extract_symbolizer(Attributes const& attributes) - : attributes_(attributes) {} + extract_symbolizer(Attributes const& attrs) + : attrs_(attrs) {} template void operator() (Symbolizer & sym) const { for (auto & prop : sym.properties) { - util::apply_visitor(evaluator(prop, attributes_), prop.second); + util::apply_visitor(evaluator(prop, attrs_), prop.second); } } - Attributes const& attributes_; + Attributes const& attrs_; }; template - static void apply(Map & m, Attributes const& attributes) + static void apply(Map & m, Attributes const& attrs) { for ( auto & val : m.styles() ) { @@ -321,7 +321,7 @@ struct evaluate_global_attributes : util::noncopyable { for (auto & sym : rule) { - util::apply_visitor(extract_symbolizer(attributes), sym); + util::apply_visitor(extract_symbolizer(attrs), sym); } } } diff --git a/include/mapnik/marker_helpers.hpp b/include/mapnik/marker_helpers.hpp index 2e935fd6e..6a509e040 100644 --- a/include/mapnik/marker_helpers.hpp +++ b/include/mapnik/marker_helpers.hpp @@ -50,8 +50,6 @@ namespace mapnik { struct clip_poly_tag; -using svg_attribute_type = agg::pod_bvector; - template struct vector_markers_dispatch : util::noncopyable { diff --git a/src/agg/agg_renderer.cpp b/src/agg/agg_renderer.cpp index e243b227a..e9ea69526 100644 --- a/src/agg/agg_renderer.cpp +++ b/src/agg/agg_renderer.cpp @@ -377,7 +377,6 @@ struct agg_render_marker_visitor using pixfmt_comp_type = agg::pixfmt_custom_blend_rgba; using renderer_base = agg::renderer_base; using renderer_type = agg::renderer_scanline_aa_solid; - using svg_attribute_type = agg::pod_bvector; ras_ptr_->reset(); if (gamma_method_ != GAMMA_POWER || gamma_ != 1.0) diff --git a/src/agg/process_group_symbolizer.cpp b/src/agg/process_group_symbolizer.cpp index 2367c39e4..b00557eeb 100644 --- a/src/agg/process_group_symbolizer.cpp +++ b/src/agg/process_group_symbolizer.cpp @@ -75,7 +75,6 @@ struct thunk_renderer : render_thunk_list_dispatch using pixfmt_comp_type = agg::pixfmt_custom_blend_rgba; using renderer_base = agg::renderer_base; using renderer_type = agg::renderer_scanline_aa_solid; - using svg_attribute_type = agg::pod_bvector; using svg_renderer_type = svg::svg_renderer_agg::process(markers_symbolizer const& sym, using pixfmt_comp_type = agg::pixfmt_custom_blend_rgba; using renderer_base = agg::renderer_base; using renderer_type = agg::renderer_scanline_aa_solid; - using svg_attribute_type = agg::pod_bvector; using svg_renderer_type = svg_renderer_agg; using namespace mapnik::svg; - using svg_attribute_type = agg::pod_bvector; using svg_renderer_type = svg_renderer_agg::process(markers_symbolizer const& sym, using renderer_type = agg::renderer_scanline_bin_solid; using namespace mapnik::svg; - using svg_attribute_type = agg::pod_bvector; using svg_renderer_type = svg_renderer_aggdl = LoadLibraryA(filename.c_str()); if (module_ && module_->dl) { - callable_returning_string name = reinterpret_cast(dlsym(module_->dl, library_name.c_str())); - if (name) name_ = name(); + callable_returning_string name_call = reinterpret_cast(dlsym(module_->dl, library_name.c_str())); + if (name_call) name_ = name_call(); callable_returning_void init_once = reinterpret_cast(dlsym(module_->dl, "on_plugin_load")); if (init_once) { init_once(); @@ -70,8 +70,8 @@ PluginInfo::PluginInfo(std::string const& filename, if (module_) module_->dl = dlopen(filename.c_str(),RTLD_LAZY); if (module_ && module_->dl) { - callable_returning_string name = reinterpret_cast(dlsym(module_->dl, library_name.c_str())); - if (name) name_ = name(); + callable_returning_string name_call = reinterpret_cast(dlsym(module_->dl, library_name.c_str())); + if (name_call) name_ = name_call(); callable_returning_void init_once = reinterpret_cast(dlsym(module_->dl, "on_plugin_load")); if (init_once) { init_once(); diff --git a/src/text/formatting/list.cpp b/src/text/formatting/list.cpp index d1820d081..686e5424c 100644 --- a/src/text/formatting/list.cpp +++ b/src/text/formatting/list.cpp @@ -37,27 +37,27 @@ namespace formatting { void list_node::to_xml(boost::property_tree::ptree & xml) const { - for (node_ptr const& node : children_) + for (node_ptr const& n : children_) { - node->to_xml(xml); + n->to_xml(xml); } } void list_node::apply(evaluated_format_properties_ptr const& p, feature_impl const& feature, attributes const& vars, text_layout & output) const { - for (node_ptr const& node : children_) + for (node_ptr const& n : children_) { - node->apply(p, feature, vars, output); + n->apply(p, feature, vars, output); } } void list_node::add_expressions(expression_set &output) const { - for (node_ptr const& node : children_) + for (node_ptr const& n : children_) { - node->add_expressions(output); + n->add_expressions(output); } } diff --git a/src/xml_tree.cpp b/src/xml_tree.cpp index a6f86edc4..0c01a9b1a 100644 --- a/src/xml_tree.cpp +++ b/src/xml_tree.cpp @@ -346,16 +346,16 @@ boost::optional xml_node::get_opt_attr(std::string const& name) const template T xml_node::get_attr(std::string const& name, T const& default_opt_value) const { - boost::optional value = get_opt_attr(name); - if (value) return *value; + boost::optional val = get_opt_attr(name); + if (val) return *val; return default_opt_value; } template T xml_node::get_attr(std::string const& name) const { - boost::optional value = get_opt_attr(name); - if (value) return *value; + boost::optional val = get_opt_attr(name); + if (val) return *val; throw attribute_not_found(name_, name); }