From 2d0582187a3695e9843f5697f2e6c5e83927d200 Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Tue, 5 Jan 2021 11:54:55 +0000 Subject: [PATCH] Fix most compiler warnings --- include/mapnik/expression_grammar_impl.hpp | 8 +++++--- .../mapnik/renderer_common/pattern_alignment.hpp | 4 ++-- src/agg/process_group_symbolizer.cpp | 9 ++++----- src/agg/process_line_pattern_symbolizer.cpp | 4 ++-- src/agg/process_markers_symbolizer.cpp | 1 - src/cairo/process_line_pattern_symbolizer.cpp | 4 ++-- src/grid/process_group_symbolizer.cpp | 11 +++++------ src/grid/process_markers_symbolizer.cpp | 13 ++++++------- 8 files changed, 26 insertions(+), 28 deletions(-) diff --git a/include/mapnik/expression_grammar_impl.hpp b/include/mapnik/expression_grammar_impl.hpp index ad28f0135..51deb547b 100644 --- a/include/mapnik/expression_grammar_impl.hpp +++ b/include/mapnik/expression_grammar_impl.hpp @@ -233,11 +233,13 @@ expression_grammar::expression_grammar(std::string const& encoding) ) ; - unary_function_expr = unary_func_type >> '(' > logical_expr > ')' + unary_function_expr = unary_func_type + > '(' > logical_expr > ')' ; - binary_function_expr = binary_func_type >> '(' > logical_expr > ',' - > logical_expr > ')' + binary_function_expr = binary_func_type + > '(' > logical_expr > ',' + > logical_expr > ')' ; unary_expr = primary_expr [_val = _1] diff --git a/include/mapnik/renderer_common/pattern_alignment.hpp b/include/mapnik/renderer_common/pattern_alignment.hpp index 04f101c29..2b183ee22 100644 --- a/include/mapnik/renderer_common/pattern_alignment.hpp +++ b/include/mapnik/renderer_common/pattern_alignment.hpp @@ -27,10 +27,10 @@ namespace mapnik { -class symbolizer_base; +struct symbolizer_base; class feature_impl; class proj_transform; -class renderer_common; +struct renderer_common; coord pattern_offset( symbolizer_base const & sym, diff --git a/src/agg/process_group_symbolizer.cpp b/src/agg/process_group_symbolizer.cpp index 6ba5605dc..e0bb3cbd2 100644 --- a/src/agg/process_group_symbolizer.cpp +++ b/src/agg/process_group_symbolizer.cpp @@ -55,11 +55,11 @@ struct thunk_renderer; template <> struct thunk_renderer : render_thunk_list_dispatch { - using renderer_type = agg_renderer; - using buffer_type = renderer_type::buffer_type; + using agg_renderer_type = agg_renderer; + using buffer_type = agg_renderer_type::buffer_type; using text_renderer_type = agg_text_renderer; - thunk_renderer(renderer_type &ren, + thunk_renderer(agg_renderer_type &ren, std::unique_ptr const& ras_ptr, buffer_type *buf, renderer_common &common) @@ -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 : render_thunk_list_dispatch } private: - renderer_type &ren_; + agg_renderer_type &ren_; std::unique_ptr const& ras_ptr_; buffer_type *buf_; renderer_common &common_; diff --git a/src/agg/process_line_pattern_symbolizer.cpp b/src/agg/process_line_pattern_symbolizer.cpp index d273b9b2a..0994a877a 100644 --- a/src/agg/process_line_pattern_symbolizer.cpp +++ b/src/agg/process_line_pattern_symbolizer.cpp @@ -211,8 +211,8 @@ struct agg_renderer_process_visitor_l private: void render_by_pattern_type(image_rgba8 const& pattern_image) const { - line_pattern_enum pattern = get(sym_, feature_, common_.vars_); - switch (pattern) + line_pattern_enum pattern_e = get(sym_, feature_, common_.vars_); + switch (pattern_e) { case LINE_PATTERN_WARP: { diff --git a/src/agg/process_markers_symbolizer.cpp b/src/agg/process_markers_symbolizer.cpp index 3fc122dcb..1becd6403 100644 --- a/src/agg/process_markers_symbolizer.cpp +++ b/src/agg/process_markers_symbolizer.cpp @@ -117,7 +117,6 @@ void agg_renderer::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::process(line_pattern_symbolizer const& sym, return; } - line_pattern_enum pattern = get(sym, feature, common_.vars_); - switch (pattern) + line_pattern_enum pattern_e = get(sym, feature, common_.vars_); + switch (pattern_e) { case LINE_PATTERN_WARP: { diff --git a/src/grid/process_group_symbolizer.cpp b/src/grid/process_group_symbolizer.cpp index ba7f48ece..7b8044a30 100644 --- a/src/grid/process_group_symbolizer.cpp +++ b/src/grid/process_group_symbolizer.cpp @@ -71,20 +71,19 @@ struct thunk_renderer : render_thunk_list_dispatch { using buf_type = grid_rendering_buffer; using pixfmt_type = typename grid_renderer_base_type::pixfmt_type; - using renderer_type = agg::renderer_scanline_bin_solid; + using marker_renderer_type = agg::renderer_scanline_bin_solid; using namespace mapnik::svg; - using svg_attribute_type = agg::pod_bvector; using svg_renderer_type = svg_renderer_agg; buf_type render_buf(pixmap_.raw_data(), common_.width_, common_.height_, common_.width_); ras_.reset(); pixfmt_type pixf(render_buf); grid_renderer_base_type renb(pixf); - renderer_type ren(renb); + marker_renderer_type ren(renb); vertex_stl_adapter stl_storage(thunk.src_->source()); svg_path_adapter svg_path(stl_storage); svg_renderer_type svg_renderer(svg_path, thunk.attrs_); @@ -100,12 +99,12 @@ struct thunk_renderer : render_thunk_list_dispatch { using buf_type = grid_rendering_buffer; using pixfmt_type = typename grid_renderer_base_type::pixfmt_type; - using renderer_type = agg::renderer_scanline_bin_solid; + using marker_renderer_type = agg::renderer_scanline_bin_solid; buf_type render_buf(pixmap_.raw_data(), common_.width_, common_.height_, common_.width_); ras_.reset(); pixfmt_type pixf(render_buf); grid_renderer_base_type renb(pixf); - renderer_type ren(renb); + marker_renderer_type ren(renb); agg::trans_affine offset_tr = thunk.tr_; offset_tr.translate(offset_.x, offset_.y); render_raster_marker(ren, ras_, thunk.src_, feature_, offset_tr, thunk.opacity_); diff --git a/src/grid/process_markers_symbolizer.cpp b/src/grid/process_markers_symbolizer.cpp index 380923211..88aba2249 100644 --- a/src/grid/process_markers_symbolizer.cpp +++ b/src/grid/process_markers_symbolizer.cpp @@ -143,7 +143,6 @@ void grid_renderer::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_agg::process(markers_symbolizer const& sym, ras_ptr->reset(); box2d clip_box = common_.query_extent_; - using context_type = detail::grid_markers_renderer_context; - context_type renderer_context(feature, render_buf, *ras_ptr, pixmap_); + using grid_context_type = detail::grid_markers_renderer_context; + grid_context_type renderer_context(feature, render_buf, *ras_ptr, pixmap_); render_markers_symbolizer( sym, feature, prj_trans, common_, clip_box, renderer_context);