Skip to content

Commit

Permalink
Rename variable from beforeIndex to afterIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Apr 13, 2012
1 parent a5b3a49 commit 49b1ad3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions src/core/qgsgeometry.cpp
Expand Up @@ -2405,7 +2405,7 @@ double QgsGeometry::closestVertexWithContext( const QgsPoint& point, int& atVert
double QgsGeometry::closestSegmentWithContext(
const QgsPoint& point,
QgsPoint& minDistPoint,
int& beforeVertex,
int& afterVertex,
double* leftOf )
{
QgsDebugMsg( "Entering." );
Expand Down Expand Up @@ -2484,7 +2484,7 @@ double QgsGeometry::closestSegmentWithContext(
ptr += sizeof( double );
}
}
beforeVertex = closestSegmentIndex;
afterVertex = closestSegmentIndex;
break;
}
case QGis::WKBMultiLineString25D:
Expand Down Expand Up @@ -2531,7 +2531,7 @@ double QgsGeometry::closestSegmentWithContext(
++pointindex;
}
}
beforeVertex = closestSegmentIndex;
afterVertex = closestSegmentIndex;
break;
}
case QGis::WKBPolygon25D:
Expand Down Expand Up @@ -2577,7 +2577,7 @@ double QgsGeometry::closestSegmentWithContext(
++index;
}
}
beforeVertex = closestSegmentIndex;
afterVertex = closestSegmentIndex;
break;
}
case QGis::WKBMultiPolygon25D:
Expand Down Expand Up @@ -2630,7 +2630,7 @@ double QgsGeometry::closestSegmentWithContext(
}
}
}
beforeVertex = closestSegmentIndex;
afterVertex = closestSegmentIndex;
break;
}
case QGis::WKBUnknown:
Expand Down
6 changes: 3 additions & 3 deletions src/core/qgsgeometry.h
Expand Up @@ -239,12 +239,12 @@ class CORE_EXPORT QgsGeometry
* Searches for the closest segment of geometry to the given point
* @param point Specifies the point for search
* @param minDistPoint Receives the nearest point on the segment
* @param beforeVertex Receives index of the vertex before the closest segment. The vertex
* after the closest segment is always beforeVertex + 1
* @param afterVertex Receives index of the vertex after the closest segment. The vertex
* before the closest segment is always afterVertex - 1
* @param leftOf Out: Returns if the point lies on the left of right side of the segment ( < 0 means left, > 0 means right )
* @return The squared cartesian distance is also returned in sqrDist, negative number on error
*/
double closestSegmentWithContext( const QgsPoint& point, QgsPoint& minDistPoint, int& beforeVertex, double* leftOf = 0 );
double closestSegmentWithContext( const QgsPoint& point, QgsPoint& minDistPoint, int& afterVertex, double* leftOf = 0 );

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

0 comments on commit 49b1ad3

Please sign in to comment.