use const ref when iterating over geometries in feature
This commit is contained in:
parent
146dc1c094
commit
1ecf3f0889
6 changed files with 7 additions and 7 deletions
|
@ -40,7 +40,7 @@ public:
|
||||||
|
|
||||||
bool pass(feature_impl & feature)
|
bool pass(feature_impl & feature)
|
||||||
{
|
{
|
||||||
for (geometry_type & geom : feature.paths())
|
for (geometry_type const& geom : feature.paths())
|
||||||
{
|
{
|
||||||
vertex_adapter va(geom);
|
vertex_adapter va(geom);
|
||||||
if (label::hit_test(va, x_,y_,tol_))
|
if (label::hit_test(va, x_,y_,tol_))
|
||||||
|
|
|
@ -58,7 +58,7 @@ void render_polygon_symbolizer(polygon_symbolizer const &sym,
|
||||||
if (simplify_tolerance > 0.0) converter.template set<simplify_tag>(); // optional simplify converter
|
if (simplify_tolerance > 0.0) converter.template set<simplify_tag>(); // optional simplify converter
|
||||||
if (smooth > 0.0) converter.template set<smooth_tag>(); // optional smooth converter
|
if (smooth > 0.0) converter.template set<smooth_tag>(); // optional smooth converter
|
||||||
|
|
||||||
for (geometry_type & geom : feature.paths())
|
for (geometry_type const& geom : feature.paths())
|
||||||
{
|
{
|
||||||
if (geom.size() > 2)
|
if (geom.size() > 2)
|
||||||
{
|
{
|
||||||
|
|
|
@ -178,7 +178,7 @@ void agg_renderer<T0,T1>::process(line_symbolizer const& sym,
|
||||||
if (simplify_tolerance > 0.0) converter.set<simplify_tag>(); // optional simplify converter
|
if (simplify_tolerance > 0.0) converter.set<simplify_tag>(); // optional simplify converter
|
||||||
if (smooth > 0.0) converter.set<smooth_tag>(); // optional smooth converter
|
if (smooth > 0.0) converter.set<smooth_tag>(); // optional smooth converter
|
||||||
|
|
||||||
for (geometry_type & geom : feature.paths())
|
for (geometry_type const& geom : feature.paths())
|
||||||
{
|
{
|
||||||
if (geom.size() > 1)
|
if (geom.size() > 1)
|
||||||
{
|
{
|
||||||
|
@ -206,7 +206,7 @@ void agg_renderer<T0,T1>::process(line_symbolizer const& sym,
|
||||||
converter.set<dash_tag>();
|
converter.set<dash_tag>();
|
||||||
converter.set<stroke_tag>(); //always stroke
|
converter.set<stroke_tag>(); //always stroke
|
||||||
|
|
||||||
for (geometry_type & geom : feature.paths())
|
for (geometry_type const& geom : feature.paths())
|
||||||
{
|
{
|
||||||
if (geom.size() > 1)
|
if (geom.size() > 1)
|
||||||
{
|
{
|
||||||
|
|
|
@ -168,7 +168,7 @@ void agg_renderer<T0,T1>::process(polygon_pattern_symbolizer const& sym,
|
||||||
if (simplify_tolerance > 0.0) converter.set<simplify_tag>(); // optional simplify converter
|
if (simplify_tolerance > 0.0) converter.set<simplify_tag>(); // optional simplify converter
|
||||||
if (smooth > 0.0) converter.set<smooth_tag>(); // optional smooth converter
|
if (smooth > 0.0) converter.set<smooth_tag>(); // optional smooth converter
|
||||||
|
|
||||||
for ( geometry_type & geom : feature.paths())
|
for ( geometry_type const& geom : feature.paths())
|
||||||
{
|
{
|
||||||
if (geom.size() > 2)
|
if (geom.size() > 2)
|
||||||
{
|
{
|
||||||
|
|
|
@ -112,7 +112,7 @@ void cairo_renderer<T>::process(polygon_pattern_symbolizer const& sym,
|
||||||
if (simplify_tolerance > 0.0) converter.set<simplify_tag>(); // optional simplify converter
|
if (simplify_tolerance > 0.0) converter.set<simplify_tag>(); // optional simplify converter
|
||||||
if (smooth > 0.0) converter.set<smooth_tag>(); // optional smooth converter
|
if (smooth > 0.0) converter.set<smooth_tag>(); // optional smooth converter
|
||||||
|
|
||||||
for ( geometry_type & geom : feature.paths())
|
for ( geometry_type const& geom : feature.paths())
|
||||||
{
|
{
|
||||||
if (geom.size() > 2)
|
if (geom.size() > 2)
|
||||||
{
|
{
|
||||||
|
|
|
@ -97,7 +97,7 @@ bool svg_renderer<OutputIterator>::process(rule::symbolizers const& syms,
|
||||||
if (process_path)
|
if (process_path)
|
||||||
{
|
{
|
||||||
// generate path output for each geometry of the current feature.
|
// generate path output for each geometry of the current feature.
|
||||||
for (auto & geom : feature.paths())
|
for (auto const& geom : feature.paths())
|
||||||
{
|
{
|
||||||
if(geom.size() > 0)
|
if(geom.size() > 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue