fix -Wshadow warning

This commit is contained in:
Dane Springmeyer 2013-01-03 18:05:40 -08:00
parent ccf10961c7
commit fa7201e01c
2 changed files with 11 additions and 6 deletions

View file

@ -75,9 +75,9 @@ class parameters : public param_map
typedef boost::optional<T> return_type;
static return_type extract(parameters const& params,
std::string const& name,
boost::optional<T> const& default_value)
boost::optional<T> const& default_opt_value)
{
boost::optional<T> result(default_value);
boost::optional<T> result(default_opt_value);
parameters::const_iterator itr = params.find(name);
if (itr != params.end())
{
@ -98,9 +98,9 @@ public:
}
template <typename T>
boost::optional<T> get(std::string const& key, T const& default_value) const
boost::optional<T> get(std::string const& key, T const& default_opt_value) const
{
return converter<T>::extract(*this,key,boost::optional<T>(default_value));
return converter<T>::extract(*this,key,boost::optional<T>(default_opt_value));
}
};
}

View file

@ -26,7 +26,12 @@
#include <mapnik/enumeration.hpp>
#include <mapnik/color_factory.hpp>
#include <mapnik/gamma_method.hpp>
#include <mapnik/rule.hpp>
#include <mapnik/line_symbolizer.hpp>
#include <mapnik/line_pattern_symbolizer.hpp>
#include <mapnik/polygon_pattern_symbolizer.hpp>
#include <mapnik/point_symbolizer.hpp>
#include <mapnik/markers_symbolizer.hpp>
#include <mapnik/feature_type_style.hpp>
#include <mapnik/text_properties.hpp>
#include <mapnik/config_error.hpp>
@ -395,11 +400,11 @@ boost::optional<T> xml_node::get_opt_attr(std::string const& name) const
}
template <typename T>
T xml_node::get_attr(std::string const& name, T const& default_value) const
T xml_node::get_attr(std::string const& name, T const& default_opt_value) const
{
boost::optional<T> value = get_opt_attr<T>(name);
if (value) return *value;
return default_value;
return default_opt_value;
}
template <typename T>