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:
laurentgom 2009-02-28 21:20:01 +00:00
parent 3553b83806
commit 3664d275cb
3 changed files with 5 additions and 5 deletions

View File

@ -277,7 +277,7 @@ private :
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Static member data // 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 Uint32 UTF8Offsets[6]; ///< Magic values to subtract during UTF-8 conversions
static const Uint8 UTF8FirstBytes[7]; ///< First bytes for UTF-8 sequences static const Uint8 UTF8FirstBytes[7]; ///< First bytes for UTF-8 sequences
}; };

View File

@ -104,7 +104,7 @@ inline Out Unicode::UTF8ToUTF16(In Begin, In End, Out Output, Uint16 Replacement
while (Begin < End) while (Begin < End)
{ {
Uint32 c = 0; Uint32 c = 0;
int TrailingBytes = UTF8TrailingBytes[*Begin]; int TrailingBytes = UTF8TrailingBytes[static_cast<int>(*Begin)];
if (Begin + TrailingBytes < End) if (Begin + TrailingBytes < End)
{ {
// First decode the UTF-8 character // 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) while (Begin < End)
{ {
Uint32 c = 0; Uint32 c = 0;
int TrailingBytes = UTF8TrailingBytes[*Begin]; int TrailingBytes = UTF8TrailingBytes[static_cast<int>(*Begin)];
if (Begin + TrailingBytes < End) if (Begin + TrailingBytes < End)
{ {
// First decode the UTF-8 character // 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; std::size_t Length = 0;
while (Begin < End) while (Begin < End)
{ {
int NbBytes = UTF8TrailingBytes[*Begin]; int NbBytes = UTF8TrailingBytes[static_cast<int>(*Begin)];
if (Begin + NbBytes < End) if (Begin + NbBytes < End)
++Length; ++Length;

View File

@ -78,7 +78,7 @@ namespace sf
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Static member data // 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,
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,