Commit b2fa409f authored by Jan Möbius's avatar Jan Möbius

Merge branch 'invalid_handles' into 'master'

make all negative handles invalid, not just -1

Since opposite_halfedge_handle for a handle with idx -1 produces a handle with idx -2, it can be helpful to detect handles with -2 as index as invalid as well.

See merge request !96
parents 2502b586 523e3e10
Pipeline #3274 failed with stage
in 75 minutes and 33 seconds
......@@ -73,8 +73,8 @@ public:
/// Get the underlying index of this handle
int idx() const { return idx_; }
/// The handle is valid iff the index is not equal to -1.
bool is_valid() const { return idx_ != -1; }
/// The handle is valid iff the index is not negative.
bool is_valid() const { return idx_ >= 0; }
/// reset handle to be invalid
void reset() { idx_=-1; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment