Skip to content

Commit 49b1ad3

Browse files
committedApr 13, 2012
Rename variable from beforeIndex to afterIndex
1 parent a5b3a49 commit 49b1ad3

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed
 

‎src/core/qgsgeometry.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2405,7 +2405,7 @@ double QgsGeometry::closestVertexWithContext( const QgsPoint& point, int& atVert
24052405
double QgsGeometry::closestSegmentWithContext(
24062406
const QgsPoint& point,
24072407
QgsPoint& minDistPoint,
2408-
int& beforeVertex,
2408+
int& afterVertex,
24092409
double* leftOf )
24102410
{
24112411
QgsDebugMsg( "Entering." );
@@ -2484,7 +2484,7 @@ double QgsGeometry::closestSegmentWithContext(
24842484
ptr += sizeof( double );
24852485
}
24862486
}
2487-
beforeVertex = closestSegmentIndex;
2487+
afterVertex = closestSegmentIndex;
24882488
break;
24892489
}
24902490
case QGis::WKBMultiLineString25D:
@@ -2531,7 +2531,7 @@ double QgsGeometry::closestSegmentWithContext(
25312531
++pointindex;
25322532
}
25332533
}
2534-
beforeVertex = closestSegmentIndex;
2534+
afterVertex = closestSegmentIndex;
25352535
break;
25362536
}
25372537
case QGis::WKBPolygon25D:
@@ -2577,7 +2577,7 @@ double QgsGeometry::closestSegmentWithContext(
25772577
++index;
25782578
}
25792579
}
2580-
beforeVertex = closestSegmentIndex;
2580+
afterVertex = closestSegmentIndex;
25812581
break;
25822582
}
25832583
case QGis::WKBMultiPolygon25D:
@@ -2630,7 +2630,7 @@ double QgsGeometry::closestSegmentWithContext(
26302630
}
26312631
}
26322632
}
2633-
beforeVertex = closestSegmentIndex;
2633+
afterVertex = closestSegmentIndex;
26342634
break;
26352635
}
26362636
case QGis::WKBUnknown:

‎src/core/qgsgeometry.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,12 +239,12 @@ class CORE_EXPORT QgsGeometry
239239
* Searches for the closest segment of geometry to the given point
240240
* @param point Specifies the point for search
241241
* @param minDistPoint Receives the nearest point on the segment
242-
* @param beforeVertex Receives index of the vertex before the closest segment. The vertex
243-
* after the closest segment is always beforeVertex + 1
242+
* @param afterVertex Receives index of the vertex after the closest segment. The vertex
243+
* before the closest segment is always afterVertex - 1
244244
* @param leftOf Out: Returns if the point lies on the left of right side of the segment ( < 0 means left, > 0 means right )
245245
* @return The squared cartesian distance is also returned in sqrDist, negative number on error
246246
*/
247-
double closestSegmentWithContext( const QgsPoint& point, QgsPoint& minDistPoint, int& beforeVertex, double* leftOf = 0 );
247+
double closestSegmentWithContext( const QgsPoint& point, QgsPoint& minDistPoint, int& afterVertex, double* leftOf = 0 );
248248

249249
/**Adds a new ring to this geometry. This makes only sense for polygon and multipolygons.
250250
@return 0 in case of success (ring added), 1 problem with geometry type, 2 ring not closed,

0 commit comments

Comments
 (0)
Please sign in to comment.