Fix most compiler warnings

This commit is contained in:
Artem Pavlenko 2021-01-05 11:54:55 +00:00
parent 255e2977a7
commit 2d0582187a
8 changed files with 26 additions and 28 deletions

View file

@ -233,11 +233,13 @@ expression_grammar<Iterator>::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]

View file

@ -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<double, 2> pattern_offset(
symbolizer_base const & sym,

View file

@ -55,11 +55,11 @@ struct thunk_renderer;
template <>
struct thunk_renderer<image_rgba8> : render_thunk_list_dispatch
{
using renderer_type = agg_renderer<image_rgba8>;
using buffer_type = renderer_type::buffer_type;
using agg_renderer_type = agg_renderer<image_rgba8>;
using buffer_type = agg_renderer_type::buffer_type;
using text_renderer_type = agg_text_renderer<buffer_type>;
thunk_renderer(renderer_type &ren,
thunk_renderer(agg_renderer_type &ren,
std::unique_ptr<rasterizer> const& ras_ptr,
buffer_type *buf,
renderer_common &common)
@ -75,7 +75,6 @@ struct thunk_renderer<image_rgba8> : render_thunk_list_dispatch
using pixfmt_comp_type = agg::pixfmt_custom_blend_rgba<blender_type, buf_type>;
using renderer_base = agg::renderer_base<pixfmt_comp_type>;
using renderer_type = agg::renderer_scanline_aa_solid<renderer_base>;
using svg_attribute_type = agg::pod_bvector<svg::path_attributes>;
using svg_renderer_type = svg::svg_renderer_agg<svg_path_adapter,
svg_attribute_type,
renderer_type,
@ -134,7 +133,7 @@ struct thunk_renderer<image_rgba8> : render_thunk_list_dispatch
}
private:
renderer_type &ren_;
agg_renderer_type &ren_;
std::unique_ptr<rasterizer> const& ras_ptr_;
buffer_type *buf_;
renderer_common &common_;

View file

@ -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<line_pattern_enum, keys::line_pattern>(sym_, feature_, common_.vars_);
switch (pattern)
line_pattern_enum pattern_e = get<line_pattern_enum, keys::line_pattern>(sym_, feature_, common_.vars_);
switch (pattern_e)
{
case LINE_PATTERN_WARP:
{

View file

@ -117,7 +117,6 @@ void agg_renderer<T0,T1>::process(markers_symbolizer const& sym,
using pixfmt_comp_type = agg::pixfmt_custom_blend_rgba<blender_type, buf_type>;
using renderer_base = agg::renderer_base<pixfmt_comp_type>;
using renderer_type = agg::renderer_scanline_aa_solid<renderer_base>;
using svg_attribute_type = agg::pod_bvector<path_attributes>;
using svg_renderer_type = svg_renderer_agg<svg_path_adapter,
svg_attribute_type,
renderer_type,

View file

@ -212,8 +212,8 @@ void cairo_renderer<T>::process(line_pattern_symbolizer const& sym,
return;
}
line_pattern_enum pattern = get<line_pattern_enum, keys::line_pattern>(sym, feature, common_.vars_);
switch (pattern)
line_pattern_enum pattern_e = get<line_pattern_enum, keys::line_pattern>(sym, feature, common_.vars_);
switch (pattern_e)
{
case LINE_PATTERN_WARP:
{

View file

@ -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<grid_renderer_base_type>;
using marker_renderer_type = agg::renderer_scanline_bin_solid<grid_renderer_base_type>;
using namespace mapnik::svg;
using svg_attribute_type = agg::pod_bvector<path_attributes>;
using svg_renderer_type = svg_renderer_agg<svg_path_adapter,
svg_attribute_type,
renderer_type,
marker_renderer_type,
pixfmt_type>;
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<svg_path_storage> 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<grid_renderer_base_type>;
using marker_renderer_type = agg::renderer_scanline_bin_solid<grid_renderer_base_type>;
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_);

View file

@ -143,7 +143,6 @@ void grid_renderer<T>::process(markers_symbolizer const& sym,
using renderer_type = agg::renderer_scanline_bin_solid<grid_renderer_base_type>;
using namespace mapnik::svg;
using svg_attribute_type = agg::pod_bvector<path_attributes>;
using svg_renderer_type = svg_renderer_agg<svg_path_adapter,
svg_attribute_type,
renderer_type,
@ -153,12 +152,12 @@ void grid_renderer<T>::process(markers_symbolizer const& sym,
ras_ptr->reset();
box2d<double> clip_box = common_.query_extent_;
using context_type = detail::grid_markers_renderer_context<svg_renderer_type,
renderer_type,
buf_type,
grid_rasterizer,
buffer_type>;
context_type renderer_context(feature, render_buf, *ras_ptr, pixmap_);
using grid_context_type = detail::grid_markers_renderer_context<svg_renderer_type,
renderer_type,
buf_type,
grid_rasterizer,
buffer_type>;
grid_context_type renderer_context(feature, render_buf, *ras_ptr, pixmap_);
render_markers_symbolizer(
sym, feature, prj_trans, common_, clip_box, renderer_context);