[meta] is_integer -> is_integral
authorBehdad Esfahbod <behdad@behdad.org>
Sat, 11 May 2019 02:48:02 +0000 (19:48 -0700)
committerBehdad Esfahbod <behdad@behdad.org>
Sat, 11 May 2019 02:48:02 +0000 (19:48 -0700)
src/hb-algs.hh
src/hb-map.hh
src/hb-meta.hh

index bbf748e..24bdeb1 100644 (file)
@@ -73,7 +73,7 @@ struct
   impl (const T& v, hb_priority<1>) const HB_RETURN (uint32_t, hb_deref (v).hash ())
 
   template <typename T,
-           hb_enable_if (hb_is_integer (T))> auto
+           hb_enable_if (hb_is_integral (T))> auto
   impl (const T& v, hb_priority<0>) const HB_AUTO_RETURN
   (
     /* Knuth's multiplicative method: */
index 942a301..26e4930 100644 (file)
@@ -43,8 +43,8 @@ struct hb_hashmap_t
   hb_hashmap_t ()  { init (); }
   ~hb_hashmap_t () { fini (); }
 
-  static_assert (hb_is_integer (K) || hb_is_pointer (K), "");
-  static_assert (hb_is_integer (V) || hb_is_pointer (V), "");
+  static_assert (hb_is_integral (K) || hb_is_pointer (K), "");
+  static_assert (hb_is_integral (V) || hb_is_pointer (V), "");
 
   /* TODO If key type is a pointer, keep hash in item_t and use to:
    * 1. avoid rehashing when resizing table, and
index 4cf8466..290b41c 100644 (file)
@@ -274,19 +274,19 @@ 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
 
-template <typename T> struct hb_is_integer             { static constexpr bool value = false;};
-template <> struct hb_is_integer<char>                         { static constexpr bool value = true; };
-template <> struct hb_is_integer<signed char>          { static constexpr bool value = true; };
-template <> struct hb_is_integer<unsigned char>        { static constexpr bool value = true; };
-template <> struct hb_is_integer<signed short>                 { static constexpr bool value = true; };
-template <> struct hb_is_integer<unsigned short>       { static constexpr bool value = true; };
-template <> struct hb_is_integer<signed int>           { static constexpr bool value = true; };
-template <> struct hb_is_integer<unsigned int>                 { static constexpr bool value = true; };
-template <> struct hb_is_integer<signed long>          { static constexpr bool value = true; };
-template <> struct hb_is_integer<unsigned long>        { static constexpr bool value = true; };
-template <> struct hb_is_integer<signed long long>     { static constexpr bool value = true; };
-template <> struct hb_is_integer<unsigned long long>   { static constexpr bool value = true; };
-#define hb_is_integer(T) hb_is_integer<T>::value
+template <typename T> struct hb_is_integral            { static constexpr bool value = false;};
+template <> struct hb_is_integral<char>                { static constexpr bool value = true; };
+template <> struct hb_is_integral<signed char>                 { static constexpr bool value = true; };
+template <> struct hb_is_integral<unsigned char>       { static constexpr bool value = true; };
+template <> struct hb_is_integral<signed short>        { static constexpr bool value = true; };
+template <> struct hb_is_integral<unsigned short>      { static constexpr bool value = true; };
+template <> struct hb_is_integral<signed int>          { static constexpr bool value = true; };
+template <> struct hb_is_integral<unsigned int>        { static constexpr bool value = true; };
+template <> struct hb_is_integral<signed long>                 { static constexpr bool value = true; };
+template <> struct hb_is_integral<unsigned long>       { static constexpr bool value = true; };
+template <> struct hb_is_integral<signed long long>    { static constexpr bool value = true; };
+template <> struct hb_is_integral<unsigned long long>  { static constexpr bool value = true; };
+#define hb_is_integral(T) hb_is_integral<T>::value
 
 
 #endif /* HB_META_HH */