From 7de2f515a0792048556078a0860c940a1ee32739 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 20 Jul 2023 12:46:54 -0600 Subject: [PATCH] [set] Remove dependency on hb-machinery.hh --- src/hb-bit-set.hh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/hb-bit-set.hh b/src/hb-bit-set.hh index 17eb06541..9e60cb934 100644 --- a/src/hb-bit-set.hh +++ b/src/hb-bit-set.hh @@ -30,7 +30,6 @@ #include "hb.hh" #include "hb-bit-page.hh" -#include "hb-machinery.hh" struct hb_bit_set_t @@ -183,6 +182,16 @@ struct hb_bit_set_t return true; } + /* Duplicated here from hb-machinery.hh to avoid including it. */ + template + static inline const Type& StructAtOffsetUnaligned(const void *P, unsigned int offset) + { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wcast-align" + return * reinterpret_cast ((const char *) P + offset); +#pragma GCC diagnostic pop + } + template void set_array (bool v, const T *array, unsigned int count, unsigned int stride=sizeof(T)) {