Commit 523e3e10 authored by Max Lyon's avatar Max Lyon

make all negative handles invalid, not just -1

parent 2502b586
Pipeline #3271 passed with stage
in 72 minutes and 47 seconds
...@@ -73,8 +73,8 @@ public: ...@@ -73,8 +73,8 @@ public:
/// Get the underlying index of this handle /// Get the underlying index of this handle
int idx() const { return idx_; } int idx() const { return idx_; }
/// The handle is valid iff the index is not equal to -1. /// The handle is valid iff the index is not negative.
bool is_valid() const { return idx_ != -1; } bool is_valid() const { return idx_ >= 0; }
/// reset handle to be invalid /// reset handle to be invalid
void reset() { idx_=-1; } 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