mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
[7731] Some code cleanups, warrning fixes.
This commit is contained in:
parent
8144f30199
commit
512c015dc2
30 changed files with 128 additions and 151 deletions
|
|
@ -117,13 +117,13 @@ namespace utf8
|
|||
}
|
||||
else if (cp < 0x10000) { // three octets
|
||||
*(result++) = static_cast<uint8_t>((cp >> 12) | 0xe0);
|
||||
*(result++) = static_cast<uint8_t>((cp >> 6) & 0x3f | 0x80);
|
||||
*(result++) = static_cast<uint8_t>(((cp >> 6) & 0x3f) | 0x80);
|
||||
*(result++) = static_cast<uint8_t>((cp & 0x3f) | 0x80);
|
||||
}
|
||||
else if (cp <= internal::CODE_POINT_MAX) { // four octets
|
||||
*(result++) = static_cast<uint8_t>((cp >> 18) | 0xf0);
|
||||
*(result++) = static_cast<uint8_t>((cp >> 12)& 0x3f | 0x80);
|
||||
*(result++) = static_cast<uint8_t>((cp >> 6) & 0x3f | 0x80);
|
||||
*(result++) = static_cast<uint8_t>(((cp >> 12)& 0x3f) | 0x80);
|
||||
*(result++) = static_cast<uint8_t>(((cp >> 6) & 0x3f) | 0x80);
|
||||
*(result++) = static_cast<uint8_t>((cp & 0x3f) | 0x80);
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue