fix various -Wunused-parameter warnings

This commit is contained in:
Dane Springmeyer 2014-10-21 20:23:17 -07:00
parent 95b301deb4
commit aae4a20ec9
26 changed files with 60 additions and 455 deletions

View file

@ -45,7 +45,7 @@
#include <iostream>
int main ( int argc , char** argv)
int main ( int, char** )
{
using namespace mapnik;
const std::string srs_lcc="+proj=lcc +ellps=GRS80 +lat_0=49 +lon_0=-95 +lat+1=49 +lat_2=77 \

View file

@ -186,7 +186,7 @@ namespace agg
scanline32_bin() : m_max_len(0), m_last_x(0x7FFFFFF0) {}
//--------------------------------------------------------------------
void reset(int min_x, int max_x)
void reset(int, int)
{
m_last_x = 0x7FFFFFF0;
m_spans.remove_all();

View file

@ -163,7 +163,7 @@ struct vector_markers_rasterizer_dispatch_grid : mapnik::noncopyable
double scale_factor,
mapnik::feature_impl const& feature,
attributes const& vars,
bool snap_to_pixels,
bool /*snap_to_pixels*/,
RendererContext const& renderer_context)
: buf_(std::get<0>(renderer_context)),
pixf_(buf_),

View file

@ -112,7 +112,7 @@ template <typename T>
struct json_coordinate_policy : karma::real_policies<T>
{
using base_type = boost::spirit::karma::real_policies<T>;
static int floatfield(T n) { return base_type::fmtflags::fixed; }
static int floatfield(T) { return base_type::fmtflags::fixed; }
static unsigned precision(T n)
{

View file

@ -94,7 +94,7 @@ struct extract_value<mapnik::value_double>
template <>
struct extract_value<mapnik::value_null>
{
static inline boost::optional<mapnik::value_null> do_extract_from_string(std::string const& source)
static inline boost::optional<mapnik::value_null> do_extract_from_string(std::string const&)
{
return boost::optional<mapnik::value_null>(); // FIXME
}

View file

@ -123,8 +123,8 @@ namespace mapnik { namespace svg {
struct coordinate_policy : karma::real_policies<T>
{
using base_type = boost::spirit::karma::real_policies<T>;
static int floatfield(T n) { return base_type::fmtflags::fixed; }
static unsigned precision(T n) { return 4u ;}
static int floatfield(T) { return base_type::fmtflags::fixed; }
static unsigned precision(T) { return 4u ;}
};
}

View file

@ -82,42 +82,43 @@ public:
/*!
* @brief Overloads that process each kind of symbolizer individually.
*/
void process(point_symbolizer const& sym,
mapnik::feature_impl & feature,
proj_transform const& prj_trans);
void process(line_symbolizer const& sym,
mapnik::feature_impl & feature,
proj_transform const& prj_trans);
void process(line_pattern_symbolizer const& sym,
mapnik::feature_impl & feature,
proj_transform const& prj_trans);
void process(polygon_symbolizer const& sym,
mapnik::feature_impl & feature,
proj_transform const& prj_trans);
void process(polygon_pattern_symbolizer const& sym,
mapnik::feature_impl & feature,
proj_transform const& prj_trans);
void process(raster_symbolizer const& sym,
mapnik::feature_impl & feature,
proj_transform const& prj_trans);
void process(shield_symbolizer const& sym,
mapnik::feature_impl & feature,
proj_transform const& prj_trans);
void process(text_symbolizer const& sym,
mapnik::feature_impl & feature,
proj_transform const& prj_trans);
void process(building_symbolizer const& sym,
mapnik::feature_impl & feature,
proj_transform const& prj_trans);
void process(markers_symbolizer const& sym,
mapnik::feature_impl & feature,
proj_transform const& prj_trans);
void process(debug_symbolizer const& /*sym*/,
mapnik::feature_impl & /*feature*/,
proj_transform const& /*prj_trans*/) {}
void process(group_symbolizer const& sym,
mapnik::feature_impl & feature,
proj_transform const& prj_trans);
// unimplemented
void process(point_symbolizer const&,
mapnik::feature_impl &,
proj_transform const&) {}
void process(line_pattern_symbolizer const&,
mapnik::feature_impl &,
proj_transform const&) {}
void process(polygon_pattern_symbolizer const&,
mapnik::feature_impl &,
proj_transform const&) {}
void process(raster_symbolizer const&,
mapnik::feature_impl &,
proj_transform const&) {}
void process(shield_symbolizer const&,
mapnik::feature_impl &,
proj_transform const&) {}
void process(text_symbolizer const&,
mapnik::feature_impl &,
proj_transform const&) {}
void process(building_symbolizer const&,
mapnik::feature_impl &,
proj_transform const&) {}
void process(markers_symbolizer const&,
mapnik::feature_impl &,
proj_transform const&) {}
void process(debug_symbolizer const&,
mapnik::feature_impl &,
proj_transform const&) {}
void process(group_symbolizer const&,
mapnik::feature_impl &,
proj_transform const&) {}
// Overload that process the whole set of symbolizers of a rule.
// return true, meaning that this renderer can process multiple symbolizers.

View file

@ -40,22 +40,22 @@ struct property_value_hash_visitor : util::static_visitor<std::size_t>
return val.rgba();
}
std::size_t operator() (font_feature_settings const& val) const
std::size_t operator() (font_feature_settings const&) const
{
return 0; //FIXME
}
std::size_t operator() (transform_type const& val) const
std::size_t operator() (transform_type const&) const
{
return 0; //FIXME
}
std::size_t operator() (enumeration_wrapper const& val) const
std::size_t operator() (enumeration_wrapper const&) const
{
return 0; //FIXME
}
std::size_t operator() (dash_array const& val) const
std::size_t operator() (dash_array const&) const
{
return 0; //FIXME
}

View file

@ -262,7 +262,7 @@ namespace {
template <typename Symbolizer, typename T>
struct set_property_impl
{
static void apply(Symbolizer & sym, mapnik::keys key, std::string const& val)
static void apply(Symbolizer &, mapnik::keys, std::string const&)
{
std::cerr << "do nothing" << std::endl;
}
@ -280,7 +280,7 @@ struct set_property_impl<Symbolizer, std::integral_constant<property_types, prop
template <typename Symbolizer>
struct set_property_impl<Symbolizer, std::integral_constant<property_types, property_types::target_double> >
{
static void apply(Symbolizer & sym, mapnik::keys key, std::string const& val)
static void apply(Symbolizer &, mapnik::keys, std::string const&)
{
std::cerr << " expects double" << std::endl;
}
@ -289,7 +289,7 @@ struct set_property_impl<Symbolizer, std::integral_constant<property_types, prop
template <typename Symbolizer>
struct set_property_impl<Symbolizer, std::integral_constant<property_types, property_types::target_bool> >
{
static void apply(Symbolizer & sym, mapnik::keys key, std::string const& val)
static void apply(Symbolizer &, mapnik::keys, std::string const&)
{
std::cerr << " expects bool" << std::endl;
}

View file

@ -122,7 +122,7 @@ template <typename T>
struct wkt_coordinate_policy : karma::real_policies<T>
{
using base_type = boost::spirit::karma::real_policies<T>;
static int floatfield(T n) { return base_type::fmtflags::fixed; }
static int floatfield(T) { return base_type::fmtflags::fixed; }
static unsigned precision(T n)
{
if (n == 0.0) return 0;

View file

@ -120,7 +120,7 @@ struct collect_attributes_visitor : public mapnik::util::static_visitor<void>
collect_attributes_visitor(mapnik::layer_descriptor & desc):
desc_(desc) {}
void operator() (mapnik::topojson::invalid const& g) {}
void operator() (mapnik::topojson::invalid const&) {}
template <typename GeomType>
void operator() (GeomType const& g)

View file

@ -354,17 +354,8 @@ if env['SVG_RENDERER']: # svg backend
svg/output/svg_generator.cpp
svg/output/svg_output_attributes.cpp
svg/output/process_symbolizers.cpp
svg/output/process_building_symbolizer.cpp
svg/output/process_line_pattern_symbolizer.cpp
svg/output/process_line_symbolizer.cpp
svg/output/process_markers_symbolizer.cpp
svg/output/process_point_symbolizer.cpp
svg/output/process_polygon_pattern_symbolizer.cpp
svg/output/process_polygon_symbolizer.cpp
svg/output/process_raster_symbolizer.cpp
svg/output/process_shield_symbolizer.cpp
svg/output/process_text_symbolizer.cpp
svg/output/process_group_symbolizer.cpp
""")
lib_env.Append(CPPDEFINES = '-DSVG_RENDERER')
libmapnik_defines.append('-DSVG_RENDERER')

View file

@ -31,9 +31,9 @@ namespace mapnik {
template <typename T>
void grid_renderer<T>::process(raster_symbolizer const& sym,
mapnik::feature_impl & feature,
proj_transform const& prj_trans)
void grid_renderer<T>::process(raster_symbolizer const&,
mapnik::feature_impl &,
proj_transform const&)
{
MAPNIK_LOG_WARN(grid_renderer) << "grid_renderer: raster_symbolizer is not yet supported";
}

View file

@ -39,20 +39,16 @@
#include <fstream>
namespace rapidxml = boost::property_tree::detail::rapidxml;
namespace mapnik
{
class rapidxml_loader : mapnik::noncopyable
{
public:
rapidxml_loader(const char *encoding = nullptr) :
filename_()
{
rapidxml_loader() :
filename_() {}
}
~rapidxml_loader()
{
}
~rapidxml_loader() {}
void load(std::string const& filename, xml_node & node)
{

View file

@ -1,43 +0,0 @@
/*****************************************************************************
*
* This file is part of Mapnik (c++ mapping toolkit)
*
* Copyright (C) 2011 Artem Pavlenko
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*****************************************************************************/
#if defined(SVG_RENDERER)
// mapnik
#include <mapnik/svg/output/svg_renderer.hpp>
namespace mapnik
{
template <typename T>
void svg_renderer<T>::process(building_symbolizer const& sym,
mapnik::feature_impl & feature,
proj_transform const& prj_trans)
{
// nothing yet.
}
template void svg_renderer<std::ostream_iterator<char> >::process(building_symbolizer const& sym,
mapnik::feature_impl & feature,
proj_transform const& prj_trans);
}
#endif

View file

@ -1,39 +0,0 @@
/*****************************************************************************
*
* This file is part of Mapnik (c++ mapping toolkit)
*
* Copyright (C) 2013 Artem Pavlenko
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*****************************************************************************/
// mapnik
#include <mapnik/svg/output/svg_renderer.hpp>
namespace mapnik
{
template <typename T>
void svg_renderer<T>::process(group_symbolizer const& sym,
mapnik::feature_impl & feature,
proj_transform const& prj_trans)
{
// nothing yet.
}
template void svg_renderer<std::ostream_iterator<char> >::process(group_symbolizer const& sym,
mapnik::feature_impl & feature,
proj_transform const& prj_trans);
}

View file

@ -1,43 +0,0 @@
/*****************************************************************************
*
* This file is part of Mapnik (c++ mapping toolkit)
*
* Copyright (C) 2011 Artem Pavlenko
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*****************************************************************************/
#if defined(SVG_RENDERER)
// mapnik
#include <mapnik/svg/output/svg_renderer.hpp>
namespace mapnik
{
template <typename T>
void svg_renderer<T>::process(line_pattern_symbolizer const& sym,
mapnik::feature_impl & feature,
proj_transform const& prj_trans)
{
// nothing yet.
}
template void svg_renderer<std::ostream_iterator<char> >::process(line_pattern_symbolizer const& sym,
mapnik::feature_impl & feature,
proj_transform const& prj_trans);
}
#endif

View file

@ -1,43 +0,0 @@
/*****************************************************************************
*
* This file is part of Mapnik (c++ mapping toolkit)
*
* Copyright (C) 2011 Artem Pavlenko
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*****************************************************************************/
#if defined(SVG_RENDERER)
// mapnik
#include <mapnik/svg/output/svg_renderer.hpp>
namespace mapnik
{
template <typename T>
void svg_renderer<T>::process(markers_symbolizer const& sym,
mapnik::feature_impl & feature,
proj_transform const& prj_trans)
{
// nothing yet.
}
template void svg_renderer<std::ostream_iterator<char> >::process(markers_symbolizer const& sym,
mapnik::feature_impl & feature,
proj_transform const& prj_trans);
}
#endif

View file

@ -1,43 +0,0 @@
/*****************************************************************************
*
* This file is part of Mapnik (c++ mapping toolkit)
*
* Copyright (C) 2011 Artem Pavlenko
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*****************************************************************************/
#if defined(SVG_RENDERER)
// mapnik
#include <mapnik/svg/output/svg_renderer.hpp>
namespace mapnik
{
template <typename T>
void svg_renderer<T>::process(point_symbolizer const& sym,
mapnik::feature_impl & feature,
proj_transform const& prj_trans)
{
// nothing yet.
}
template void svg_renderer<std::ostream_iterator<char> >::process(point_symbolizer const& sym,
mapnik::feature_impl & feature,
proj_transform const& prj_trans);
}
#endif

View file

@ -1,43 +0,0 @@
/*****************************************************************************
*
* This file is part of Mapnik (c++ mapping toolkit)
*
* Copyright (C) 2011 Artem Pavlenko
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*****************************************************************************/
#if defined(SVG_RENDERER)
// mapnik
#include <mapnik/svg/output/svg_renderer.hpp>
namespace mapnik
{
template <typename T>
void svg_renderer<T>::process(polygon_pattern_symbolizer const& sym,
mapnik::feature_impl & feature,
proj_transform const& prj_trans)
{
// nothing yet.
}
template void svg_renderer<std::ostream_iterator<char> >::process(polygon_pattern_symbolizer const& sym,
mapnik::feature_impl & feature,
proj_transform const& prj_trans);
}
#endif

View file

@ -34,7 +34,7 @@ namespace mapnik
*/
template <typename T>
void svg_renderer<T>::process(polygon_symbolizer const& sym,
mapnik::feature_impl & feature,
mapnik::feature_impl &,
proj_transform const& prj_trans)
{
path_attributes_.set_fill_color(get<mapnik::color>(sym, keys::fill, mapnik::color(128,128,128)));

View file

@ -1,43 +0,0 @@
/*****************************************************************************
*
* This file is part of Mapnik (c++ mapping toolkit)
*
* Copyright (C) 2011 Artem Pavlenko
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*****************************************************************************/
#if defined(SVG_RENDERER)
// mapnik
#include <mapnik/svg/output/svg_renderer.hpp>
namespace mapnik
{
template <typename T>
void svg_renderer<T>::process(raster_symbolizer const& sym,
mapnik::feature_impl & feature,
proj_transform const& prj_trans)
{
// nothing yet.
}
template void svg_renderer<std::ostream_iterator<char> >::process(raster_symbolizer const& sym,
mapnik::feature_impl & feature,
proj_transform const& prj_trans);
}
#endif

View file

@ -1,43 +0,0 @@
/*****************************************************************************
*
* This file is part of Mapnik (c++ mapping toolkit)
*
* Copyright (C) 2011 Artem Pavlenko
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*****************************************************************************/
#if defined(SVG_RENDERER)
// mapnik
#include <mapnik/svg/output/svg_renderer.hpp>
namespace mapnik
{
template <typename T>
void svg_renderer<T>::process(shield_symbolizer const& sym,
mapnik::feature_impl & feature,
proj_transform const& prj_trans)
{
// nothing yet.
}
template void svg_renderer<std::ostream_iterator<char> >::process(shield_symbolizer const& sym,
mapnik::feature_impl & feature,
proj_transform const& prj_trans);
}
#endif

View file

@ -40,15 +40,15 @@ namespace mapnik {
struct symbol_type_dispatch : public util::static_visitor<bool>
{
template <typename Symbolizer>
bool operator()(Symbolizer const& sym) const
bool operator()(Symbolizer const&) const
{
return false;
}
bool operator()(line_symbolizer const& sym) const
bool operator()(line_symbolizer const&) const
{
return true;
}
bool operator()(polygon_symbolizer const& sym) const
bool operator()(polygon_symbolizer const&) const
{
return true;
}

View file

@ -1,43 +0,0 @@
/*****************************************************************************
*
* This file is part of Mapnik (c++ mapping toolkit)
*
* Copyright (C) 2011 Artem Pavlenko
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*****************************************************************************/
#if defined(SVG_RENDERER)
// mapnik
#include <mapnik/svg/output/svg_renderer.hpp>
namespace mapnik
{
template <typename T>
void svg_renderer<T>::process(text_symbolizer const& sym,
mapnik::feature_impl & feature,
proj_transform const& prj_trans)
{
// nothing yet.
}
template void svg_renderer<std::ostream_iterator<char> >::process(text_symbolizer const& sym,
mapnik::feature_impl & feature,
proj_transform const& prj_trans);
}
#endif

View file

@ -82,7 +82,7 @@ void svg_renderer<T>::start_map_processing(Map const& map)
}
template <typename T>
void svg_renderer<T>::end_map_processing(Map const& map)
void svg_renderer<T>::end_map_processing(Map const&)
{
// generate SVG root element closing tag.
generator_.generate_closing_root();
@ -90,7 +90,7 @@ void svg_renderer<T>::end_map_processing(Map const& map)
}
template <typename T>
void svg_renderer<T>::start_layer_processing(layer const& lay, box2d<double> const& query_extent)
void svg_renderer<T>::start_layer_processing(layer const& lay, box2d<double> const&)
{
generator_.generate_opening_group(lay.name());
MAPNIK_LOG_DEBUG(svg_renderer) << "svg_renderer: Start layer processing=" << lay.name();