Revert back IntType out cast to signed/unsigned

Previous commit didn't fix the bots. Putting it back now that I
understand why I initially did the "Wide" casts.  But only doing
it for out-cast this time.  This causes "narrowing" warnings
whenever we are converting signed/unsigned to smaller HBUINT16
etc.  But those are valuable warnings.  We should address those
separately instead of ignoring.

Maybe we should start using uint16_t more liberally in the
internal subsetter function signatures then.
This commit is contained in:
Behdad Esfahbod 2021-02-22 22:42:50 -07:00
parent 0983601399
commit d6bd00a488
1 changed files with 1 additions and 6 deletions

View File

@ -62,12 +62,7 @@ struct IntType
IntType () = default;
explicit constexpr IntType (Type V) : v {V} {}
IntType& operator = (Type i) { v = i; return *this; }
operator Type () const { return v; }
template <typename Type2 = hb_conditional<hb_is_signed (Type), signed, unsigned>,
hb_enable_if (sizeof (Type) < sizeof (Type2))>
operator hb_type_identity_t<Type2> () const { return v; }
operator hb_conditional<hb_is_signed (Type), signed, unsigned> () const { return v; }
bool operator == (const IntType &o) const { return (Type) v == (Type) o.v; }
bool operator != (const IntType &o) const { return !(*this == o); }