From d6bd00a488ace632d51748b028a0378a2bdaad2c Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 22 Feb 2021 22:42:50 -0700 Subject: [PATCH] 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. --- src/hb-open-type.hh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/hb-open-type.hh b/src/hb-open-type.hh index ff12d4af5..3c6625376 100644 --- a/src/hb-open-type.hh +++ b/src/hb-open-type.hh @@ -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 , - hb_enable_if (sizeof (Type) < sizeof (Type2))> - operator hb_type_identity_t () const { return v; } - + operator hb_conditional () const { return v; } bool operator == (const IntType &o) const { return (Type) v == (Type) o.v; } bool operator != (const IntType &o) const { return !(*this == o); }