Fix for the bug ID: 2823847: warnings from GCC 4.3
git-svn-id: http://svn.code.sf.net/p/utfcpp/code@95 a809a056-fc17-0410-9590-b4f493f8b08e
This commit is contained in:
parent
6452a42438
commit
58ab95c963
2 changed files with 6 additions and 6 deletions
|
@ -117,13 +117,13 @@ namespace utf8
|
||||||
}
|
}
|
||||||
else if (cp < 0x10000) { // three octets
|
else if (cp < 0x10000) { // three octets
|
||||||
*(result++) = static_cast<uint8_t>((cp >> 12) | 0xe0);
|
*(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);
|
*(result++) = static_cast<uint8_t>((cp & 0x3f) | 0x80);
|
||||||
}
|
}
|
||||||
else if (cp <= internal::CODE_POINT_MAX) { // four octets
|
else if (cp <= internal::CODE_POINT_MAX) { // four octets
|
||||||
*(result++) = static_cast<uint8_t>((cp >> 18) | 0xf0);
|
*(result++) = static_cast<uint8_t>((cp >> 18) | 0xf0);
|
||||||
*(result++) = static_cast<uint8_t>((cp >> 12)& 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 >> 6) & 0x3f) | 0x80);
|
||||||
*(result++) = static_cast<uint8_t>((cp & 0x3f) | 0x80);
|
*(result++) = static_cast<uint8_t>((cp & 0x3f) | 0x80);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -45,13 +45,13 @@ namespace utf8
|
||||||
}
|
}
|
||||||
else if (cp < 0x10000) { // three octets
|
else if (cp < 0x10000) { // three octets
|
||||||
*(result++) = static_cast<uint8_t>((cp >> 12) | 0xe0);
|
*(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);
|
*(result++) = static_cast<uint8_t>((cp & 0x3f) | 0x80);
|
||||||
}
|
}
|
||||||
else { // four octets
|
else { // four octets
|
||||||
*(result++) = static_cast<uint8_t>((cp >> 18) | 0xf0);
|
*(result++) = static_cast<uint8_t>((cp >> 18) | 0xf0);
|
||||||
*(result++) = static_cast<uint8_t>((cp >> 12)& 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 >> 6) & 0x3f) | 0x80);
|
||||||
*(result++) = static_cast<uint8_t>((cp & 0x3f) | 0x80);
|
*(result++) = static_cast<uint8_t>((cp & 0x3f) | 0x80);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Reference in a new issue