drop useless template usage for has_key
This commit is contained in:
parent
934f0dec1d
commit
c2fe4a14be
5 changed files with 7 additions and 8 deletions
|
@ -69,7 +69,7 @@ void render_markers_symbolizer(markers_symbolizer const& sym,
|
|||
// special case for simple ellipse markers
|
||||
// to allow for full control over rx/ry dimensions
|
||||
if (filename == "shape://ellipse"
|
||||
&& (has_key<double>(sym,keys::width) || has_key<double>(sym,keys::height)))
|
||||
&& (has_key(sym,keys::width) || has_key(sym,keys::height)))
|
||||
{
|
||||
svg_storage_type marker_ellipse;
|
||||
vertex_stl_adapter<svg_path_storage> stl_storage(marker_ellipse.source());
|
||||
|
|
|
@ -410,8 +410,7 @@ void put(symbolizer_base & sym, keys key, T const& val)
|
|||
detail::put_impl<T, enum_ >::apply(sym, key, val);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
bool has_key(symbolizer_base const& sym, keys key)
|
||||
inline bool has_key(symbolizer_base const& sym, keys key)
|
||||
{
|
||||
return (sym.properties.count(key) == 1);
|
||||
}
|
||||
|
|
|
@ -201,7 +201,7 @@ void agg_renderer<T0,T1>::process(line_symbolizer const& sym,
|
|||
converter.set<affine_transform_tag>(); // optional affine transform
|
||||
if (simplify_tolerance > 0.0) converter.set<simplify_tag>(); // optional simplify converter
|
||||
if (smooth > 0.0) converter.set<smooth_tag>(); // optional smooth converter
|
||||
if (has_key<dash_array>(sym, keys::stroke_dasharray))
|
||||
if (has_key(sym, keys::stroke_dasharray))
|
||||
converter.set<dash_tag>();
|
||||
converter.set<stroke_tag>(); //always stroke
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ void grid_renderer<T>::process(line_symbolizer const& sym,
|
|||
double offset = get<value_double>(sym, keys::offset, feature, common_.vars_,0.0);
|
||||
double simplify_tolerance = get<value_double>(sym, keys::simplify_tolerance, feature, common_.vars_,0.0);
|
||||
double smooth = get<value_double>(sym, keys::smooth, feature, common_.vars_,false);
|
||||
bool has_dash = has_key<dash_array>(sym, keys::stroke_dasharray);
|
||||
bool has_dash = has_key(sym, keys::stroke_dasharray);
|
||||
|
||||
if (clip)
|
||||
{
|
||||
|
|
|
@ -29,16 +29,16 @@ void build_ellipse(symbolizer_base const& sym, mapnik::feature_impl & feature, a
|
|||
{
|
||||
double width = 0.0;
|
||||
double height = 0.0;
|
||||
if (has_key<double>(sym,keys::width) && has_key<double>(sym,keys::height))
|
||||
if (has_key(sym,keys::width) && has_key(sym,keys::height))
|
||||
{
|
||||
width = get<double>(sym, keys::width, feature, vars, 0.0);
|
||||
height = get<double>(sym, keys::height, feature, vars, 0.0);
|
||||
}
|
||||
else if (has_key<double>(sym,keys::width))
|
||||
else if (has_key(sym,keys::width))
|
||||
{
|
||||
width = height = get<double>(sym, keys::width, feature, vars, 0.0);
|
||||
}
|
||||
else if (has_key<double>(sym,keys::height))
|
||||
else if (has_key(sym,keys::height))
|
||||
{
|
||||
width = height = get<double>(sym, keys::height, feature, vars, 0.0);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue