Minor
authorBehdad Esfahbod <behdad@behdad.org>
Sat, 11 May 2019 03:31:20 +0000 (20:31 -0700)
committerBehdad Esfahbod <behdad@behdad.org>
Sat, 11 May 2019 03:31:20 +0000 (20:31 -0700)
src/hb-meta.hh
src/hb-open-type.hh

index 7b4d026..71698f9 100644 (file)
@@ -292,10 +292,5 @@ template <> struct hb_int_max<signed long long>            { static constexpr signed long
 template <> struct hb_int_max<unsigned long long>      { static constexpr unsigned long long   value = ULLONG_MAX;     };
 #define hb_int_max(T) hb_int_max<T>::value
 
-template <bool is_signed> struct hb_signedness_int;
-template <> struct hb_signedness_int<false> { typedef unsigned int value; };
-template <> struct hb_signedness_int<true>  { typedef   signed int value; };
-#define hb_signedness_int(T) hb_signedness_int<T>::value
-
 
 #endif /* HB_META_HH */
index a7e10ed..9e17b5c 100644 (file)
@@ -57,7 +57,7 @@ template <typename Type, unsigned int Size>
 struct IntType
 {
   typedef Type type;
-  typedef typename hb_signedness_int (hb_is_signed (Type)) wide_type;
+  typedef hb_conditional<hb_is_signed (Type), signed, unsigned> wide_type;
 
   IntType<Type, Size>& operator = (wide_type i) { v = i; return *this; }
   operator wide_type () const { return v; }