Geom: interate ClipperLib::Path by reference
ClipperLib::Path is std::vector<IntPoint>. Iterating this with "for( auto point : path)" could result in 'n' IntPoint copy-constructions. It does seem GCC 8, at least, manages to optimise these constructions out. Replace with the "standard" for( const auto& point : path) idiom.
This commit is contained in:
parent
9a41fd060b
commit
6880687f00
|
@ -132,7 +132,7 @@ public:
|
|||
{
|
||||
m_points.reserve( aPath.size() );
|
||||
|
||||
for( auto point : aPath )
|
||||
for( const auto& point : aPath )
|
||||
m_points.emplace_back( point.X, point.Y );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue