From e6909ee58d0f7b954f3bb227c2f90ca4cfd0c858 Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Wed, 18 Sep 2019 22:12:25 +0430 Subject: [PATCH] minor --- src/hb-buffer.cc | 2 +- src/hb-common.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-buffer.cc b/src/hb-buffer.cc index bfe06da74..bb7f3c7c1 100644 --- a/src/hb-buffer.cc +++ b/src/hb-buffer.cc @@ -324,7 +324,7 @@ hb_buffer_t::clear_positions () out_len = 0; out_info = info; - if (len) + if (likely (len)) memset (pos, 0, sizeof (pos[0]) * len); } diff --git a/src/hb-common.cc b/src/hb-common.cc index 08ec04e41..0ae0c05f4 100644 --- a/src/hb-common.cc +++ b/src/hb-common.cc @@ -381,7 +381,7 @@ hb_language_from_string (const char *str, int len) const char * hb_language_to_string (hb_language_t language) { - if (!language) return nullptr; + if (unlikely (!language)) return nullptr; return language->s; }