summaryrefslogtreecommitdiffstats
path: root/util/charset/wide_specific.h
diff options
context:
space:
mode:
authorbreakneck <[email protected]>2022-02-10 16:47:58 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:47:58 +0300
commite2021f9a0e54d13b7c48796318b13b66dc625e74 (patch)
tree5aed1691033eaf399ab80a10a137238922035fa8 /util/charset/wide_specific.h
parent83602b1b564b92a80a1526d113fa2846661dd10e (diff)
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'util/charset/wide_specific.h')
-rw-r--r--util/charset/wide_specific.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/util/charset/wide_specific.h b/util/charset/wide_specific.h
index 4ea765b94b6..983bf55341e 100644
--- a/util/charset/wide_specific.h
+++ b/util/charset/wide_specific.h
@@ -1,22 +1,22 @@
-#pragma once
-
-#include <util/system/types.h>
-#include <util/system/yassert.h>
-
-inline constexpr bool IsW16SurrogateLead(wchar16 c) noexcept {
- return 0xD800 <= c && c <= 0xDBFF;
-}
-
-inline constexpr bool IsW16SurrogateTail(wchar16 c) noexcept {
- return 0xDC00 <= c && c <= 0xDFFF;
-}
-
-inline size_t W16SymbolSize(const wchar16* begin, const wchar16* end) {
- Y_ASSERT(begin < end);
-
- if ((begin + 1 != end) && IsW16SurrogateLead(*begin) && IsW16SurrogateTail(*(begin + 1))) {
- return 2;
- }
-
- return 1;
-}
+#pragma once
+
+#include <util/system/types.h>
+#include <util/system/yassert.h>
+
+inline constexpr bool IsW16SurrogateLead(wchar16 c) noexcept {
+ return 0xD800 <= c && c <= 0xDBFF;
+}
+
+inline constexpr bool IsW16SurrogateTail(wchar16 c) noexcept {
+ return 0xDC00 <= c && c <= 0xDFFF;
+}
+
+inline size_t W16SymbolSize(const wchar16* begin, const wchar16* end) {
+ Y_ASSERT(begin < end);
+
+ if ((begin + 1 != end) && IsW16SurrogateLead(*begin) && IsW16SurrogateTail(*(begin + 1))) {
+ return 2;
+ }
+
+ return 1;
+}