m Add comments to IntType cast out operator

Okay, bots seem to be happy. Merging.
pull/2875/head
Behdad Esfahbod 4 years ago
parent 83b66bfb66
commit 486da35cc0
  1. 2
      src/hb-open-type.hh

@ -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; }

Loading…
Cancel
Save