Skip to content

Commit

Permalink
deal with various -Wunused-parameter warnings that are not importatn
Browse files Browse the repository at this point in the history
  • Loading branch information
Dane Springmeyer committed Jul 23, 2013
1 parent 72bfa28 commit f682fcc
Show file tree
Hide file tree
Showing 13 changed files with 36 additions and 45 deletions.
6 changes: 2 additions & 4 deletions include/mapnik/attribute_collector.hpp
Expand Up @@ -47,7 +47,6 @@
#include <mapnik/text_placements/base.hpp> // for text_placements

// boost
#include <boost/concept_check.hpp>
#include <boost/variant/static_visitor.hpp>
#include <boost/variant/apply_visitor.hpp>

Expand All @@ -62,12 +61,11 @@ struct expression_attributes : boost::static_visitor<void>
explicit expression_attributes(Container& names)
: names_(names) {}

void operator() (value_type const& x) const
void operator() (value_type const& /*x*/) const
{
boost::ignore_unused_variable_warning(x);
}

void operator() (geometry_type_attribute const& type) const
void operator() (geometry_type_attribute const& /*type*/) const
{
// do nothing
}
Expand Down
6 changes: 1 addition & 5 deletions include/mapnik/feature_style_processor_impl.hpp
Expand Up @@ -49,7 +49,6 @@
#include <boost/variant/apply_visitor.hpp>
#include <boost/variant/static_visitor.hpp>
#include <boost/foreach.hpp>
#include <boost/concept_check.hpp>

// stl
#include <vector>
Expand All @@ -74,11 +73,8 @@ template <> // No-op specialization
struct process_impl<false>
{
template <typename T0, typename T1, typename T2, typename T3>
static void process(T0 & ren, T1 const& sym, T2 & f, T3 const& tr)
static void process(T0 & /*ren*/, T1 const& /*sym*/, T2 & /*f*/, T3 const& /*tr*/)
{
boost::ignore_unused_variable_warning(ren);
boost::ignore_unused_variable_warning(f);
boost::ignore_unused_variable_warning(tr);
#ifdef MAPNIK_DEBUG
std::clog << "NO-OP ...\n";
#endif
Expand Down
8 changes: 4 additions & 4 deletions include/mapnik/grid/grid_pixfmt.hpp
Expand Up @@ -40,7 +40,7 @@ template<class ColorT> struct blender_gray
enum base_scale_e { base_shift = color_type::base_shift };

static AGG_INLINE void blend_pix(value_type* p, unsigned cv,
unsigned alpha, unsigned cover=0)
unsigned alpha, unsigned /*cover*/=0)
{
*p = (value_type)((((cv - calc_type(*p)) * alpha) + (calc_type(*p) << base_shift)) >> base_shift);
}
Expand Down Expand Up @@ -256,7 +256,7 @@ class pixfmt_alpha_blend_gray
void blend_hline(int x, int y,
unsigned len,
const color_type& c,
agg::int8u cover)
agg::int8u /*cover*/)
{
value_type* p = (value_type*)
m_rbuf->row_ptr(x, y, len) + x * Step + Offset;
Expand Down Expand Up @@ -588,7 +588,7 @@ class pixfmt_alpha_blend_gray
void blend_from_color(const SrcPixelFormatRenderer& from,
const color_type& color,
int xdst, int ydst,
int xsrc, int ysrc,
int /*xsrc*/, int ysrc,
unsigned len,
agg::int8u cover)
{
Expand All @@ -615,7 +615,7 @@ class pixfmt_alpha_blend_gray
void blend_from_lut(const SrcPixelFormatRenderer& from,
const color_type* color_lut,
int xdst, int ydst,
int xsrc, int ysrc,
int /*xsrc*/, int ysrc,
unsigned len,
agg::int8u cover)
{
Expand Down
4 changes: 2 additions & 2 deletions include/mapnik/grid/grid_renderer.hpp
Expand Up @@ -73,8 +73,8 @@ class MAPNIK_DECL grid_renderer : public feature_style_processor<grid_renderer<T
void end_map_processing(Map const& map);
void start_layer_processing(layer const& lay, box2d<double> const& query_extent);
void end_layer_processing(layer const& lay);
void start_style_processing(feature_type_style const& st) {}
void end_style_processing(feature_type_style const& st) {}
void start_style_processing(feature_type_style const& /*st*/) {}
void end_style_processing(feature_type_style const& /*st*/) {}
void render_marker(mapnik::feature_impl & feature, unsigned int step, pixel_position const& pos, marker const& marker, const agg::trans_affine & tr, double opacity, composite_mode_e comp_op);

void process(point_symbolizer const& sym,
Expand Down
3 changes: 1 addition & 2 deletions include/mapnik/placement_finder.hpp
Expand Up @@ -57,8 +57,7 @@ template <typename DetectorT>
class placement_finder : mapnik::noncopyable
{
public:
placement_finder(feature_impl const& feature,
text_placement_info const& placement_info,
placement_finder(text_placement_info const& placement_info,
string_info const& info,
DetectorT & detector,
box2d<double> const& extent);
Expand Down
12 changes: 6 additions & 6 deletions include/mapnik/svg/output/svg_renderer.hpp
Expand Up @@ -79,8 +79,8 @@ class MAPNIK_DECL svg_renderer : public feature_style_processor<svg_renderer<Out
void end_map_processing(Map const& map);
void start_layer_processing(layer const& lay, box2d<double> const& query_extent);
void end_layer_processing(layer const& lay);
void start_style_processing(feature_type_style const& st) {}
void end_style_processing(feature_type_style const& st) {}
void start_style_processing(feature_type_style const& /*st*/) {}
void end_style_processing(feature_type_style const& /*st*/) {}

/*!
* @brief Overloads that process each kind of symbolizer individually.
Expand Down Expand Up @@ -115,9 +115,9 @@ class MAPNIK_DECL svg_renderer : public feature_style_processor<svg_renderer<Out
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(debug_symbolizer const& /*sym*/,
mapnik::feature_impl & /*feature*/,
proj_transform const& /*prj_trans*/) {}

/*!
* @brief Overload that process the whole set of symbolizers of a rule.
Expand All @@ -127,7 +127,7 @@ class MAPNIK_DECL svg_renderer : public feature_style_processor<svg_renderer<Out
mapnik::feature_impl & feature,
proj_transform const& prj_trans);

void painted(bool painted)
void painted(bool /*painted*/)
{
// nothing to do
}
Expand Down
5 changes: 2 additions & 3 deletions include/mapnik/svg/svg_renderer_agg.hpp
Expand Up @@ -52,7 +52,6 @@
#include "agg_gradient_lut.h"
#include "agg_gamma_lut.h"
#include "agg_span_interpolator_linear.h"
#include "agg_pixfmt_rgba.h"

namespace mapnik {
namespace svg {
Expand Down Expand Up @@ -341,8 +340,8 @@ class svg_renderer_agg : mapnik::noncopyable
Renderer& ren,
int feature_id,
agg::trans_affine const& mtx,
double opacity,
box2d<double> const& symbol_bbox)
double /*opacity*/,
box2d<double> const& /*symbol_bbox*/)

{
using namespace agg;
Expand Down
5 changes: 2 additions & 3 deletions include/mapnik/symbolizer_hash.hpp
Expand Up @@ -34,10 +34,9 @@ namespace mapnik {
struct symbolizer_hash
{
template <typename T>
static std::size_t value(T const& sym)
static std::size_t value(T const& /*sym*/)
{
std::size_t seed = 0;
return seed;
return 0;
}
// specialisation for polygon_symbolizer
static std::size_t value(polygon_symbolizer const& sym)
Expand Down
6 changes: 3 additions & 3 deletions include/mapnik/tiff_io.hpp
Expand Up @@ -146,16 +146,16 @@ static toff_t tiff_size_proc(thandle_t fd)
return (toff_t)len;
}

static tsize_t tiff_dummy_read_proc(thandle_t fd, tdata_t buf, tsize_t size)
static tsize_t tiff_dummy_read_proc(thandle_t /*fd*/, tdata_t /*buf*/, tsize_t /*size*/)
{
return 0;
}

static void tiff_dummy_unmap_proc(thandle_t fd, tdata_t base, toff_t size)
static void tiff_dummy_unmap_proc(thandle_t /*fd*/, tdata_t /*base*/, toff_t /*size*/)
{
}

static int tiff_dummy_map_proc(thandle_t fd, tdata_t* pbase, toff_t* psize)
static int tiff_dummy_map_proc(thandle_t /*fd*/, tdata_t* /*pbase*/, toff_t* /*psize*/)
{
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion include/mapnik/util/container_adapter.hpp
Expand Up @@ -55,7 +55,7 @@ template <>
struct end_container<mapnik::geometry_type const>
{
static mapnik::util::path_iterator<mapnik::geometry_type>
call (mapnik::geometry_type const& g)
call (mapnik::geometry_type const& /*g*/)
{
return mapnik::util::path_iterator<mapnik::geometry_type>();
}
Expand Down
2 changes: 1 addition & 1 deletion include/mapnik/util/geometry_svg_generator.hpp
Expand Up @@ -76,7 +76,7 @@ template <>
struct end_container<path_type const>
{
static mapnik::util::path_iterator<path_type>
call (path_type const& g)
call (path_type const& /*g*/)
{
return mapnik::util::path_iterator<path_type>();
}
Expand Down
4 changes: 2 additions & 2 deletions include/mapnik/vertex_converters.hpp
Expand Up @@ -89,7 +89,7 @@ struct converter_traits
typedef T0 geometry_type;
typedef geometry_type conv_type;
template <typename Args>
static void setup(geometry_type & geom, Args const& /*args*/)
static void setup(geometry_type & /*geom*/, Args const& /*args*/)
{
throw std::runtime_error("invalid call to setup");
}
Expand Down Expand Up @@ -219,7 +219,7 @@ struct converter_traits<T,mapnik::close_poly_tag>
typedef T geometry_type;
typedef typename agg::conv_close_polygon<geometry_type> conv_type;
template <typename Args>
static void setup(geometry_type & geom, Args const& /*args*/)
static void setup(geometry_type & /*geom*/, Args const& /*args*/)
{
// no-op
}
Expand Down
18 changes: 9 additions & 9 deletions include/mapnik/xml_attribute_cast.hpp
Expand Up @@ -44,7 +44,7 @@ namespace mapnik { namespace detail {
template <typename T>
struct do_xml_attribute_cast
{
static inline boost::optional<T> xml_attribute_cast_impl(xml_tree const& tree, std::string const& source)
static inline boost::optional<T> xml_attribute_cast_impl(xml_tree const& /*tree*/, std::string const& /*source*/)
{
std::string err_msg = (boost::format("No conversion from std::string to %s") % typeid(T).name()).str();
throw std::runtime_error(err_msg);
Expand All @@ -55,7 +55,7 @@ struct do_xml_attribute_cast
template <>
struct do_xml_attribute_cast<mapnik::boolean>
{
static inline boost::optional<mapnik::boolean> xml_attribute_cast_impl(xml_tree const& tree, std::string const& source)
static inline boost::optional<mapnik::boolean> xml_attribute_cast_impl(xml_tree const& /*tree*/, std::string const& source)
{
bool result;
if (mapnik::util::string2bool(source, result))
Expand All @@ -68,7 +68,7 @@ struct do_xml_attribute_cast<mapnik::boolean>
template <>
struct do_xml_attribute_cast<int>
{
static inline boost::optional<int> xml_attribute_cast_impl(xml_tree const& tree, std::string const& source)
static inline boost::optional<int> xml_attribute_cast_impl(xml_tree const& /*tree*/, std::string const& source)
{
int result;
if (mapnik::util::string2int(source, result))
Expand All @@ -82,7 +82,7 @@ struct do_xml_attribute_cast<int>
template <>
struct do_xml_attribute_cast<long long>
{
static inline boost::optional<long long> xml_attribute_cast_impl(xml_tree const& tree, std::string const& source)
static inline boost::optional<long long> xml_attribute_cast_impl(xml_tree const& /*tree*/, std::string const& source)
{
int result;
if (mapnik::util::string2int(source, result))
Expand All @@ -98,7 +98,7 @@ struct do_xml_attribute_cast<long long>
template <>
struct do_xml_attribute_cast<unsigned>
{
static inline boost::optional<unsigned> xml_attribute_cast_impl(xml_tree const& tree, std::string const& source)
static inline boost::optional<unsigned> xml_attribute_cast_impl(xml_tree const& /*tree*/, std::string const& source)
{
int result;
if (mapnik::util::string2int(source, result))
Expand All @@ -111,7 +111,7 @@ struct do_xml_attribute_cast<unsigned>
template <>
struct do_xml_attribute_cast<float>
{
static inline boost::optional<float> xml_attribute_cast_impl(xml_tree const& tree, std::string const& source)
static inline boost::optional<float> xml_attribute_cast_impl(xml_tree const& /*tree*/, std::string const& source)
{
float result;
if (mapnik::util::string2float(source, result))
Expand All @@ -124,7 +124,7 @@ struct do_xml_attribute_cast<float>
template <>
struct do_xml_attribute_cast<double>
{
static inline boost::optional<double> xml_attribute_cast_impl(xml_tree const& tree, std::string const& source)
static inline boost::optional<double> xml_attribute_cast_impl(xml_tree const& /*tree*/, std::string const& source)
{
double result;
if (mapnik::util::string2double(source, result))
Expand All @@ -137,7 +137,7 @@ struct do_xml_attribute_cast<double>
template <typename T, int MAX>
struct do_xml_attribute_cast<mapnik::enumeration<T,MAX> >
{
static inline boost::optional<mapnik::enumeration<T,MAX> > xml_attribute_cast_impl(xml_tree const& tree, std::string const& source)
static inline boost::optional<mapnik::enumeration<T,MAX> > xml_attribute_cast_impl(xml_tree const& /*tree*/, std::string const& source)
{
typedef typename boost::optional<mapnik::enumeration<T,MAX> > result_type;
try
Expand Down Expand Up @@ -168,7 +168,7 @@ struct do_xml_attribute_cast<mapnik::color>
template <>
struct do_xml_attribute_cast<std::string>
{
static inline boost::optional<std::string> xml_attribute_cast_impl(xml_tree const& tree, std::string const& source)
static inline boost::optional<std::string> xml_attribute_cast_impl(xml_tree const& /*tree*/, std::string const& source)
{
return boost::optional<std::string>(source);
}
Expand Down

0 comments on commit f682fcc

Please sign in to comment.