From 39c132a62d57d736971fe16e1e47817e443df4f0 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 10 Jun 2022 07:12:39 -0600 Subject: [PATCH] [indic/myanmar] Simplify compare functions --- src/hb-ot-shaper-indic.cc | 2 +- src/hb-ot-shaper-myanmar.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-ot-shaper-indic.cc b/src/hb-ot-shaper-indic.cc index 717fbb0ca..33f1ed996 100644 --- a/src/hb-ot-shaper-indic.cc +++ b/src/hb-ot-shaper-indic.cc @@ -461,7 +461,7 @@ compare_indic_order (const hb_glyph_info_t *pa, const hb_glyph_info_t *pb) int a = pa->indic_position(); int b = pb->indic_position(); - return a < b ? -1 : a == b ? 0 : +1; + return (int) a - (int) b; } diff --git a/src/hb-ot-shaper-myanmar.cc b/src/hb-ot-shaper-myanmar.cc index 8238b8e27..9696ced70 100644 --- a/src/hb-ot-shaper-myanmar.cc +++ b/src/hb-ot-shaper-myanmar.cc @@ -202,7 +202,7 @@ compare_myanmar_order (const hb_glyph_info_t *pa, const hb_glyph_info_t *pb) int a = pa->myanmar_position(); int b = pb->myanmar_position(); - return a < b ? -1 : a == b ? 0 : +1; + return (int) a - (int) b; }