Fix compiler warning
This commit is contained in:
parent
91a527a0e0
commit
208d3d7cda
1 changed files with 1 additions and 1 deletions
|
@ -332,7 +332,7 @@ static uint32_t codepoint_from_utf16(const std::vector<uint16_t>& utf16, size_t&
|
||||||
else {
|
else {
|
||||||
if (offset + 1 >= utf16.size() || !((utf16[1] & 0xdc00) == 0xdc00))
|
if (offset + 1 >= utf16.size() || !((utf16[1] & 0xdc00) == 0xdc00))
|
||||||
throw std::invalid_argument("invalid character");
|
throw std::invalid_argument("invalid character");
|
||||||
auto result = 0x10000 + ((utf16[0] & 0x03ff) << 10) | (utf16[1] & 0x03ff);
|
auto result = 0x10000 + (((utf16[0] & 0x03ff) << 10) | (utf16[1] & 0x03ff));
|
||||||
offset += 2;
|
offset += 2;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue