Common: Enforce explicit handle validation
Some checks failed
Doxygen Action / build (push) Has been cancelled

Some invalid handle values are -1 or INVALID_HANDLE_VALUE, hence our
handle template has a specific invalid handle value parameter we should
always test against. Time and again, I find my code simply comparing
handle against zero.

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman 2025-07-08 11:18:21 +02:00
parent c014480acb
commit e4f28df310

View File

@ -323,6 +323,10 @@ namespace macstd
}
}
private:
// Force use of valid() method when testing handle.
operator bool() const;
protected:
T m_h; ///< Object handle
};