Browse Source

Fix FontFaceFreeType signedness warning on MSVC.

Lasse Öörni 9 years ago
parent
commit
02ab74ec6a
1 changed files with 4 additions and 4 deletions
  1. 4 4
      Source/Urho3D/UI/FontFaceFreeType.cpp

+ 4 - 4
Source/Urho3D/UI/FontFaceFreeType.cpp

@@ -412,23 +412,23 @@ bool FontFaceFreeType::LoadCharGlyph(unsigned charCode, Image* image)
             FT_Render_Glyph(slot, FT_RENDER_MODE_NORMAL);
             if (slot->bitmap.pixel_mode == FT_PIXEL_MODE_MONO)
             {
-                for (unsigned int y = 0; y < slot->bitmap.rows; ++y)
+                for (unsigned y = 0; y < (unsigned)slot->bitmap.rows; ++y)
                 {
                     unsigned char* src = slot->bitmap.buffer + slot->bitmap.pitch * y;
                     unsigned char* rowDest = dest + y * pitch;
 
-                    for (unsigned int x = 0; x < slot->bitmap.width; ++x)
+                    for (unsigned x = 0; x < (unsigned)slot->bitmap.width; ++x)
                         rowDest[x] = (unsigned char)((src[x >> 3] & (0x80 >> (x & 7))) ? 255 : 0);
                 }
             }
             else
             {
-                for (unsigned int y = 0; y < slot->bitmap.rows; ++y)
+                for (unsigned y = 0; y < (unsigned)slot->bitmap.rows; ++y)
                 {
                     unsigned char* src = slot->bitmap.buffer + slot->bitmap.pitch * y;
                     unsigned char* rowDest = dest + y * pitch;
 
-                    for (unsigned int x = 0; x < slot->bitmap.width; ++x)
+                    for (unsigned x = 0; x < (unsigned)slot->bitmap.width; ++x)
                         rowDest[x] = src[x];
                 }
             }