From 104484cefeca03d95837bba5f39178693c86ce8a Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 11 Aug 2014 18:23:43 -0400 Subject: [PATCH] Minor --- src/hb-common.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/hb-common.h b/src/hb-common.h index f5141b9ee..b6ce3f724 100644 --- a/src/hb-common.h +++ b/src/hb-common.h @@ -123,12 +123,13 @@ hb_direction_from_string (const char *str, int len); const char * hb_direction_to_string (hb_direction_t direction); +#define HB_DIRECTION_IS_VALID(dir) ((((unsigned int) (dir)) & ~3U) == 4) +/* Direction must be valid for the following */ #define HB_DIRECTION_IS_HORIZONTAL(dir) ((((unsigned int) (dir)) & ~1U) == 4) #define HB_DIRECTION_IS_VERTICAL(dir) ((((unsigned int) (dir)) & ~1U) == 6) #define HB_DIRECTION_IS_FORWARD(dir) ((((unsigned int) (dir)) & ~2U) == 4) #define HB_DIRECTION_IS_BACKWARD(dir) ((((unsigned int) (dir)) & ~2U) == 5) -#define HB_DIRECTION_IS_VALID(dir) ((((unsigned int) (dir)) & ~3U) == 4) -#define HB_DIRECTION_REVERSE(dir) ((hb_direction_t) (((unsigned int) (dir)) ^ 1)) /* Direction must be valid */ +#define HB_DIRECTION_REVERSE(dir) ((hb_direction_t) (((unsigned int) (dir)) ^ 1)) /* hb_language_t */