From c1c2292b419acb1873d58f60e3e6515f91dea010 Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 20 Mar 2019 19:25:03 +1100 Subject: Backport: Use noexcept where sensible. Rename UTF8 string_view parameters for clarity. Backport of changeset 7326:2f9b5e1c97ae, but without variable renames, since they are not applicable. --- src/UniConversion.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/UniConversion.h') diff --git a/src/UniConversion.h b/src/UniConversion.h index 9f405e1ed..e8e98df5f 100644 --- a/src/UniConversion.h +++ b/src/UniConversion.h @@ -14,10 +14,10 @@ const int UTF8MaxBytes = 4; const int unicodeReplacementChar = 0xFFFD; -size_t UTF8Length(const wchar_t *uptr, size_t tlen); +size_t UTF8Length(const wchar_t *uptr, size_t tlen) noexcept; void UTF8FromUTF16(const wchar_t *uptr, size_t tlen, char *putf, size_t len); -void UTF8FromUTF32Character(int uch, char *putf); -size_t UTF16Length(const char *s, size_t len); +void UTF8FromUTF32Character(int uch, char *putf) noexcept; +size_t UTF16Length(const char *s, size_t len) noexcept; size_t UTF16FromUTF8(const char *s, size_t len, wchar_t *tbuf, size_t tlen); size_t UTF32Length(const char *s, size_t len) noexcept; size_t UTF32FromUTF8(const char *s, size_t len, unsigned int *tbuf, size_t tlen); -- cgit v1.2.3