From fffc67effd8f3f18d7fc562d1e30049b786c8b1f Mon Sep 17 00:00:00 2001 From: nemtrif Date: Sun, 25 Jun 2023 13:00:20 -0400 Subject: [PATCH] Make some internal helper functions non-template --- source/utf8/core.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/source/utf8/core.h b/source/utf8/core.h index 5f09970..fbf4535 100644 --- a/source/utf8/core.h +++ b/source/utf8/core.h @@ -99,26 +99,22 @@ namespace internal return ((utf8::internal::mask8(oc) >> 6) == 0x2); } - template - inline bool is_lead_surrogate(u16 cp) + inline bool is_lead_surrogate(utfchar32_t cp) { return (cp >= LEAD_SURROGATE_MIN && cp <= LEAD_SURROGATE_MAX); } - template - inline bool is_trail_surrogate(u16 cp) + inline bool is_trail_surrogate(utfchar32_t cp) { return (cp >= TRAIL_SURROGATE_MIN && cp <= TRAIL_SURROGATE_MAX); } - template - inline bool is_surrogate(u16 cp) + inline bool is_surrogate(utfchar32_t cp) { return (cp >= LEAD_SURROGATE_MIN && cp <= TRAIL_SURROGATE_MAX); } - template - inline bool is_code_point_valid(u32 cp) + inline bool is_code_point_valid(utfchar32_t cp) { return (cp <= CODE_POINT_MAX && !utf8::internal::is_surrogate(cp)); }