mirror of
https://github.com/SFML/SFML.git
synced 2024-11-24 20:31:05 +08:00
Fixed warnings in Unicode.inl
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1031 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
3553b83806
commit
3664d275cb
@ -277,7 +277,7 @@ private :
|
||||
////////////////////////////////////////////////////////////
|
||||
// Static member data
|
||||
////////////////////////////////////////////////////////////
|
||||
static const char UTF8TrailingBytes[256]; ///< Lookup table to find the length of an UTF-8 sequence
|
||||
static const int UTF8TrailingBytes[256]; ///< Lookup table to find the length of an UTF-8 sequence
|
||||
static const Uint32 UTF8Offsets[6]; ///< Magic values to subtract during UTF-8 conversions
|
||||
static const Uint8 UTF8FirstBytes[7]; ///< First bytes for UTF-8 sequences
|
||||
};
|
||||
|
@ -104,7 +104,7 @@ inline Out Unicode::UTF8ToUTF16(In Begin, In End, Out Output, Uint16 Replacement
|
||||
while (Begin < End)
|
||||
{
|
||||
Uint32 c = 0;
|
||||
int TrailingBytes = UTF8TrailingBytes[*Begin];
|
||||
int TrailingBytes = UTF8TrailingBytes[static_cast<int>(*Begin)];
|
||||
if (Begin + TrailingBytes < End)
|
||||
{
|
||||
// First decode the UTF-8 character
|
||||
@ -165,7 +165,7 @@ inline Out Unicode::UTF8ToUTF32(In Begin, In End, Out Output, Uint32 Replacement
|
||||
while (Begin < End)
|
||||
{
|
||||
Uint32 c = 0;
|
||||
int TrailingBytes = UTF8TrailingBytes[*Begin];
|
||||
int TrailingBytes = UTF8TrailingBytes[static_cast<int>(*Begin)];
|
||||
if (Begin + TrailingBytes < End)
|
||||
{
|
||||
// First decode the UTF-8 character
|
||||
@ -424,7 +424,7 @@ inline std::size_t Unicode::GetUTF8Length(In Begin, In End)
|
||||
std::size_t Length = 0;
|
||||
while (Begin < End)
|
||||
{
|
||||
int NbBytes = UTF8TrailingBytes[*Begin];
|
||||
int NbBytes = UTF8TrailingBytes[static_cast<int>(*Begin)];
|
||||
if (Begin + NbBytes < End)
|
||||
++Length;
|
||||
|
||||
|
@ -78,7 +78,7 @@ namespace sf
|
||||
////////////////////////////////////////////////////////////
|
||||
// Static member data
|
||||
////////////////////////////////////////////////////////////
|
||||
const char Unicode::UTF8TrailingBytes[256] =
|
||||
const int Unicode::UTF8TrailingBytes[256] =
|
||||
{
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
Loading…
Reference in New Issue
Block a user