geometry: don't copy stuff in SHAPE_POLY_SET::GetRelativeIndices. Huge performance improvement for large polygons
This commit is contained in:
parent
ee70c6dd5b
commit
9b2fbae706
|
@ -104,11 +104,11 @@ bool SHAPE_POLY_SET::GetRelativeIndices( int aGlobalIdx,
|
|||
|
||||
for( polygonIdx = 0; polygonIdx < OutlineCount(); polygonIdx++ )
|
||||
{
|
||||
const POLYGON currentPolygon = CPolygon( polygonIdx );
|
||||
const POLYGON& currentPolygon = CPolygon( polygonIdx );
|
||||
|
||||
for( contourIdx = 0; contourIdx < currentPolygon.size(); contourIdx++ )
|
||||
{
|
||||
SHAPE_LINE_CHAIN currentContour = currentPolygon[contourIdx];
|
||||
const SHAPE_LINE_CHAIN& currentContour = currentPolygon[contourIdx];
|
||||
int totalPoints = currentContour.PointCount();
|
||||
|
||||
for( vertexIdx = 0; vertexIdx < totalPoints; vertexIdx++ )
|
||||
|
|
Loading…
Reference in New Issue