summaryrefslogtreecommitdiffstats
path: root/thirdparty/harfbuzz/src/hb.hh
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2023-05-23 03:05:01 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2023-05-23 03:26:16 +0300
commitb64df2bf74eddbf28e2e484d05c46a5ad0d7ee14 (patch)
tree92094a0540179f5722b1fe10499ef45155928fcb /thirdparty/harfbuzz/src/hb.hh
parentd5c1b9f883adbb54900c145eafcaa789d0fd563c (diff)
downloadredot-engine-b64df2bf74eddbf28e2e484d05c46a5ad0d7ee14.tar.gz
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
Diffstat (limited to 'thirdparty/harfbuzz/src/hb.hh')
-rw-r--r--thirdparty/harfbuzz/src/hb.hh10
1 files changed, 8 insertions, 2 deletions
diff --git a/thirdparty/harfbuzz/src/hb.hh b/thirdparty/harfbuzz/src/hb.hh
index d09849e565..205f8cf196 100644
--- a/thirdparty/harfbuzz/src/hb.hh
+++ b/thirdparty/harfbuzz/src/hb.hh
@@ -255,8 +255,8 @@ extern "C" void hb_free_impl(void *ptr);
#endif
#if defined(__OPTIMIZE__) && hb_has_builtin(__builtin_expect)
-#define likely(expr) (__builtin_expect (!!(expr), 1))
-#define unlikely(expr) (__builtin_expect (!!(expr), 0))
+#define likely(expr) __builtin_expect (bool(expr), 1)
+#define unlikely(expr) __builtin_expect (bool(expr), 0)
#else
#define likely(expr) (expr)
#define unlikely(expr) (expr)
@@ -509,6 +509,12 @@ static_assert ((sizeof (hb_mask_t) == 4), "");
static_assert ((sizeof (hb_var_int_t) == 4), "");
+/* Pie time. */
+// https://github.com/harfbuzz/harfbuzz/issues/4166
+#define HB_PI 3.14159265358979f
+#define HB_2_PI (2.f * HB_PI)
+
+
/* Headers we include for everyone. Keep topologically sorted by dependency.
* They express dependency amongst themselves, but no other file should include
* them directly.*/