Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
Use explicit INVALID_INDEX constant
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo Mercier committed Sep 8, 2017
1 parent 4ff7cea commit 46557e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/algorithm/connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,13 @@
#include <SFCGAL/PolyhedralSurface.h>
#include <SFCGAL/TriangulatedSurface.h>

#include <limits>

namespace SFCGAL {
namespace algorithm {

const size_t SurfaceGraph::INVALID_INDEX = std::numeric_limits< size_t >::max();

void SurfaceGraph::addRing( const LineString& ring, FaceIndex faceIndex )
{
const size_t numSegments = ring.numSegments() ;
Expand Down
2 changes: 1 addition & 1 deletion src/algorithm/connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class SFCGAL_API SurfaceGraph : boost::noncopyable {
typedef size_t VertexIndex;
typedef size_t FaceIndex;
typedef std::map< Coordinate, VertexIndex > CoordinateMap ;
static const size_t INVALID_INDEX = size_t( -1 ) ; // would use std::numeric_limits< size_t >::max() if it were constant, or SIZE_MAX if it were easier to find.
static const size_t INVALID_INDEX;
// an edge is inserted with vtx ordered by the first polygon we treat,
// we search the edge with reverse ordered vtx indexes.
// as a result, an inconsistent orientation between polygons can be spotted by
Expand Down

0 comments on commit 46557e0

Please # to comment.