Skip to content

Commit 7f794aa

Browse files
committed
fix merge error
1 parent 056c447 commit 7f794aa

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

keyvi/include/keyvi/dictionary/util/utf8_utils.h

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,25 +48,21 @@ class Utf8Utils final {
4848

4949
[[nodiscard]]
5050
static size_t GetCharLength(unsigned char leadByte) {
51-
if ((leadByte & 0x80U) == 0x00u) // 0xxxxxxx
52-
if ((leadByte & 0x80u) == 0x00u) { // 0xxxxxxx
51+
if ((leadByte & 0x80U) == 0x00U) { // 0xxxxxxx
5352
return 1;
54-
}
53+
}
5554

56-
if ((leadByte & 0xE0U) == 0xC0u) // 110xxxxx
57-
if ((leadByte & 0xE0u) == 0xC0u) { // 110xxxxx
55+
if ((leadByte & 0xE0u) == 0xC0U) { // 110xxxxx
5856
return 2;
59-
}
57+
}
6058

61-
if ((leadByte & 0xF0U) == 0xE0u) // 1110xxxx
62-
if ((leadByte & 0xF0u) == 0xE0u) { // 1110xxxx
59+
if ((leadByte & 0xF0U) == 0xE0U) { // 1110xxxx
6360
return 3;
64-
}
61+
}
6562

66-
if ((leadByte & 0xF8U) == 0xF0u) // 11110xxx
67-
if ((leadByte & 0xF8u) == 0xF0u) { // 11110xxx
63+
if ((leadByte & 0xF8U) == 0xF0U) { // 11110xxx
6864
return 4;
69-
}
65+
}
7066

7167
throw std::invalid_argument("Illegal UTF-8 lead byte: " + std::to_string(leadByte));
7268
}

0 commit comments

Comments
 (0)