summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-03-29 19:53:41 +0000
committerMatthias Clasen <mclasen@redhat.com>2021-03-29 19:53:41 +0000
commit11ac1ec2ef311ea49469705eef393f9d3aadf9b9 (patch)
tree6a0769450c42e3c858360ecef419df49827aded4
parentce13859046ac37ba94c6a5727c221b0b97e90a9e (diff)
parent90e7453e1b627a437b33d04e0cc10c247495928a (diff)
downloadpango-11ac1ec2ef311ea49469705eef393f9d3aadf9b9.tar.gz
Merge branch 'fix-msvc-build' into 'master'
Fix the build with msvc See merge request GNOME/pango!308
-rw-r--r--pango/pango-emoji.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/pango/pango-emoji.c b/pango/pango-emoji.c
index 8d5a46d6..0abb8783 100644
--- a/pango/pango-emoji.c
+++ b/pango/pango-emoji.c
@@ -158,14 +158,16 @@ static inline unsigned char
_pango_EmojiSegmentationCategory (gunichar codepoint)
{
/* Specific ones first. */
+ if (('a' <= codepoint && codepoint <= 'z') ||
+ ('A' <= codepoint && codepoint <= 'Z') ||
+ codepoint == ' ')
+ return kMaxEmojiScannerCategory;
+
+ if ('0' <= codepoint && codepoint <= '9')
+ return KEYCAP_BASE;
+
switch (codepoint)
{
- case 'a' ... 'z':
- case 'A' ... 'Z':
- case ' ':
- return kMaxEmojiScannerCategory;
- case '0' ... '9':
- return KEYCAP_BASE;
case kCombiningEnclosingKeycapCharacter:
return COMBINING_ENCLOSING_KEYCAP;
case kCombiningEnclosingCircleBackslashCharacter:
@@ -178,14 +180,15 @@ _pango_EmojiSegmentationCategory (gunichar codepoint)
return VS16;
case 0x1F3F4:
return TAG_BASE;
- case 0xE0030 ... 0xE0039:
- case 0xE0061 ... 0xE007A:
- return TAG_SEQUENCE;
case 0xE007F:
return TAG_TERM;
default: ;
}
+ if ((0xE0030 <= codepoint && codepoint <= 0xE0039) ||
+ (0xE0061 <= codepoint && codepoint <= 0xE007A))
+ return TAG_SEQUENCE;
+
if (_pango_Is_Emoji_Modifier_Base (codepoint))
return EMOJI_MODIFIER_BASE;
if (_pango_Is_Emoji_Modifier (codepoint))