fix yet more -Wshadow warnings

This commit is contained in:
Dane Springmeyer 2016-01-21 14:13:55 -08:00
parent 9b5f948c7f
commit e14fa647a1
11 changed files with 57 additions and 57 deletions

View file

@ -43,8 +43,8 @@ struct evaluate_expression
{
using value_type = T;
explicit evaluate_expression(Attributes const& attributes)
: attributes_(attributes) {}
explicit evaluate_expression(Attributes const& _attributes)
: attributes_(_attributes) {}
value_type operator() (attribute const&) const
{

View file

@ -66,9 +66,9 @@ struct percent_offset_impl
double operator() (double val) const
{
double result = std::abs(val/100.0);
if (result > 1.0) result = 1.0;
return result;
double _result = std::abs(val/100.0);
if (_result > 1.0) _result = 1.0;
return _result;
}
};

View file

@ -47,8 +47,8 @@ struct MAPNIK_DECL image_view_any : image_view_base
image_view_any() = default;
template <typename T>
image_view_any(T && data) noexcept
: image_view_base(std::move(data)) {}
image_view_any(T && _data) noexcept
: image_view_base(std::move(_data)) {}
std::size_t width() const;
std::size_t height() const;

View file

@ -49,9 +49,9 @@ public:
data_(std::move(data)),
filter_factor_(filter_factor) {}
void set_nodata(double nodata)
void set_nodata(double _nodata)
{
nodata_ = nodata;
nodata_ = _nodata;
}
boost::optional<double> const& nodata() const

View file

@ -169,9 +169,9 @@ public:
span_image_resample_rgba_affine(source_type & src,
interpolator_type & inter,
agg::image_filter_lut const & filter,
agg::image_filter_lut const & _filter,
boost::optional<value_type> const & nodata_value) :
agg::span_image_resample_rgba_affine<Source>(src, inter, filter)
agg::span_image_resample_rgba_affine<Source>(src, inter, _filter)
{ }
};

View file

@ -50,8 +50,8 @@ private:
class text_placement_info_list : public text_placement_info
{
public:
text_placement_info_list(text_placements_list const* parent, double scale_factor) :
text_placement_info(parent, scale_factor),
text_placement_info_list(text_placements_list const* parent, double _scale_factor) :
text_placement_info(parent, _scale_factor),
state(0), parent_(parent) {}
bool next() const;
private:

View file

@ -148,9 +148,9 @@ std::vector<filter::filter_type> const& feature_type_style::direct_image_filter
return direct_filters_;
}
void feature_type_style::set_comp_op(composite_mode_e comp_op)
void feature_type_style::set_comp_op(composite_mode_e _comp_op)
{
comp_op_ = comp_op;
comp_op_ = _comp_op;
}
boost::optional<composite_mode_e> feature_type_style::comp_op() const

View file

@ -31,9 +31,9 @@
namespace mapnik
{
layer::layer(std::string const& name, std::string const& srs)
: name_(name),
srs_(srs),
layer::layer(std::string const& _name, std::string const& _srs)
: name_(_name),
srs_(_srs),
minimum_scale_denom_(0),
maximum_scale_denom_(std::numeric_limits<double>::max()),
active_(true),
@ -114,9 +114,9 @@ bool layer::operator==(layer const& rhs) const
layer::~layer() {}
void layer::set_name( std::string const& name)
void layer::set_name( std::string const& _name)
{
name_ = name;
name_ = _name;
}
std::string const& layer::name() const
@ -124,9 +124,9 @@ std::string const& layer::name() const
return name_;
}
void layer::set_srs(std::string const& srs)
void layer::set_srs(std::string const& _srs)
{
srs_ = srs;
srs_ = _srs;
}
std::string const& layer::srs() const
@ -169,9 +169,9 @@ double layer::maximum_scale_denominator() const
return maximum_scale_denom_;
}
void layer::set_active(bool active)
void layer::set_active(bool _active)
{
active_=active;
active_ = _active;
}
bool layer::active() const
@ -184,9 +184,9 @@ bool layer::visible(double scale_denom) const
return active() && scale_denom >= minimum_scale_denom_ - 1e-6 && scale_denom < maximum_scale_denom_ + 1e-6;
}
void layer::set_queryable(bool queryable)
void layer::set_queryable(bool _queryable)
{
queryable_=queryable;
queryable_ = _queryable;
}
bool layer::queryable() const
@ -250,9 +250,9 @@ bool layer::clear_label_cache() const
return clear_label_cache_;
}
void layer::set_cache_features(bool cache_features)
void layer::set_cache_features(bool _cache_features)
{
cache_features_ = cache_features;
cache_features_ = _cache_features;
}
bool layer::cache_features() const

View file

@ -375,39 +375,39 @@ unsigned Map::height() const
return height_;
}
void Map::set_width(unsigned width)
void Map::set_width(unsigned _width)
{
if (width != width_ &&
width >= MIN_MAPSIZE &&
width <= MAX_MAPSIZE)
if (_width != width_ &&
_width >= MIN_MAPSIZE &&
_width <= MAX_MAPSIZE)
{
width_=width;
width_=_width;
fixAspectRatio();
}
}
void Map::set_height(unsigned height)
void Map::set_height(unsigned _height)
{
if (height != height_ &&
height >= MIN_MAPSIZE &&
height <= MAX_MAPSIZE)
if (_height != height_ &&
_height >= MIN_MAPSIZE &&
_height <= MAX_MAPSIZE)
{
height_=height;
height_ = _height;
fixAspectRatio();
}
}
void Map::resize(unsigned width,unsigned height)
void Map::resize(unsigned _width, unsigned _height)
{
if ((width != width_ ||
height != height_) &&
width >= MIN_MAPSIZE &&
width <= MAX_MAPSIZE &&
height >= MIN_MAPSIZE &&
height <= MAX_MAPSIZE)
if ((_width != width_ ||
_height != height_) &&
_width >= MIN_MAPSIZE &&
_width <= MAX_MAPSIZE &&
_height >= MIN_MAPSIZE &&
_height <= MAX_MAPSIZE)
{
width_=width;
height_=height;
width_ = _width;
height_ = _height;
fixAspectRatio();
}
}
@ -417,14 +417,14 @@ std::string const& Map::srs() const
return srs_;
}
void Map::set_srs(std::string const& srs)
void Map::set_srs(std::string const& _srs)
{
srs_ = srs;
srs_ = _srs;
}
void Map::set_buffer_size( int buffer_size)
void Map::set_buffer_size(int _buffer_size)
{
buffer_size_ = buffer_size;
buffer_size_ = _buffer_size;
}
int Map::buffer_size() const

View file

@ -68,12 +68,12 @@ const char * memory_datasource::name()
return "memory";
}
memory_datasource::memory_datasource(parameters const& params)
: datasource(params),
memory_datasource::memory_datasource(parameters const& _params)
: datasource(_params),
desc_(memory_datasource::name(),
*params.get<std::string>("encoding","utf-8")),
*params_.get<std::string>("encoding","utf-8")),
type_(datasource::Vector),
bbox_check_(*params.get<boolean_type>("bbox_check", true)),
bbox_check_(*params_.get<boolean_type>("bbox_check", true)),
type_set_(false) {}
memory_datasource::~memory_datasource() {}

View file

@ -88,11 +88,11 @@ void font_face_set::add(face_ptr face)
faces_.push_back(face);
}
void font_face_set::set_character_sizes(double size)
void font_face_set::set_character_sizes(double _size)
{
for (face_ptr const& face : faces_)
{
face->set_character_sizes(size);
face->set_character_sizes(_size);
}
}