1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-16 14:00:40 +00:00

Update HarfBuzz, ICU and FreeType

HarfBuzz: Update to version 7.3.0
ICU4C: Update to version 73.1
FreeType: Update to version 2.13.0
This commit is contained in:
bruvzg
2023-05-23 03:05:01 +03:00
parent d5c1b9f883
commit b64df2bf74
810 changed files with 32198 additions and 11081 deletions

View File

@@ -122,9 +122,13 @@ struct hb_array_t : hb_iter_with_fallback_t<hb_array_t<Type>, Type&>
uint32_t hash () const
{
uint32_t current = 0;
// FNV-1a hash function
uint32_t current = /*cbf29ce4*/0x84222325;
for (auto &v : *this)
current = current * 31 + hb_hash (v);
{
current = current ^ hb_hash (v);
current = current * 16777619;
}
return current;
}
@@ -452,36 +456,50 @@ inline bool hb_array_t<const unsigned char>::operator == (const hb_array_t<const
template <>
inline uint32_t hb_array_t<const char>::hash () const
{
uint32_t current = 0;
// FNV-1a hash function
uint32_t current = /*cbf29ce4*/0x84222325;
unsigned i = 0;
#if defined(__OPTIMIZE__) && !defined(HB_NO_PACKED) && \
((defined(__GNUC__) && __GNUC__ >= 5) || defined(__clang__))
struct __attribute__((packed)) packed_uint32_t { uint32_t v; };
for (; i + 4 <= this->length; i += 4)
current = current * 31 + hb_hash ((uint32_t) ((packed_uint32_t *) &this->arrayZ[i])->v);
{
current = current ^ hb_hash ((uint32_t) ((const packed_uint32_t *) &this->arrayZ[i])->v);
current = current * 16777619;
}
#endif
for (; i < this->length; i++)
current = current * 31 + hb_hash (this->arrayZ[i]);
{
current = current ^ hb_hash (this->arrayZ[i]);
current = current * 16777619;
}
return current;
}
template <>
inline uint32_t hb_array_t<const unsigned char>::hash () const
{
uint32_t current = 0;
// FNV-1a hash function
uint32_t current = /*cbf29ce4*/0x84222325;
unsigned i = 0;
#if defined(__OPTIMIZE__) && !defined(HB_NO_PACKED) && \
((defined(__GNUC__) && __GNUC__ >= 5) || defined(__clang__))
struct __attribute__((packed)) packed_uint32_t { uint32_t v; };
for (; i + 4 <= this->length; i += 4)
current = current * 31 + hb_hash ((uint32_t) ((packed_uint32_t *) &this->arrayZ[i])->v);
{
current = current ^ hb_hash ((uint32_t) ((const packed_uint32_t *) &this->arrayZ[i])->v);
current = current * 16777619;
}
#endif
for (; i < this->length; i++)
current = current * 31 + hb_hash (this->arrayZ[i]);
{
current = current ^ hb_hash (this->arrayZ[i]);
current = current * 16777619;
}
return current;
}