m Add comments to IntType cast out operator

Okay, bots seem to be happy. Merging.
This commit is contained in:
Behdad Esfahbod 2021-02-23 13:58:14 -07:00
parent 83b66bfb66
commit 486da35cc0
1 changed files with 2 additions and 0 deletions

View File

@ -62,6 +62,8 @@ struct IntType
IntType () = default;
explicit constexpr IntType (Type V) : v {V} {}
IntType& operator = (Type i) { v = i; return *this; }
/* For reason we define cast out operator for signed/unsigned, instead of Type, see:
* https://github.com/harfbuzz/harfbuzz/pull/2875/commits/09836013995cab2b9f07577a179ad7b024130467 */
operator hb_conditional<hb_is_signed (Type), signed, unsigned> () const { return v; }
bool operator == (const IntType &o) const { return (Type) v == (Type) o.v; }