diff options
author | ngosang <diegodelasheras@gmail.com> | 2015-01-27 13:20:57 +0100 |
---|---|---|
committer | Craig Robbins <kde.psych@gmail.com> | 2015-02-05 02:41:55 +1000 |
commit | 1b4aaa5f505518c1464ebcadda7549aa7c69675b (patch) | |
tree | dc4125419a95e4b729938e9f74f9ac0b143a4508 | |
parent | b4cdbc997f391f9b769caee03f413126fb26be05 (diff) | |
download | minetest-1b4aaa5f505518c1464ebcadda7549aa7c69675b.tar.gz minetest-1b4aaa5f505518c1464ebcadda7549aa7c69675b.tar.bz2 minetest-1b4aaa5f505518c1464ebcadda7549aa7c69675b.zip |
Suppress 4 gcc 4.9.2 warnings in CGUITTFont.cpp
-rw-r--r-- | src/cguittfont/CGUITTFont.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cguittfont/CGUITTFont.cpp b/src/cguittfont/CGUITTFont.cpp index 92a24784e..170b26648 100644 --- a/src/cguittfont/CGUITTFont.cpp +++ b/src/cguittfont/CGUITTFont.cpp @@ -87,10 +87,10 @@ video::IImage* SGUITTGlyph::createGlyphImage(const FT_Bitmap& bits, video::IVide const u32 image_pitch = image->getPitch() / sizeof(u16); u16* image_data = (u16*)image->lock(); u8* glyph_data = bits.buffer; - for (s32 y = 0; y < bits.rows; ++y) + for (u32 y = 0; y < bits.rows; ++y) { u16* row = image_data; - for (s32 x = 0; x < bits.width; ++x) + for (u32 x = 0; x < bits.width; ++x) { // Monochrome bitmaps store 8 pixels per byte. The left-most pixel is the bit 0x80. // So, we go through the data each bit at a time. @@ -116,10 +116,10 @@ video::IImage* SGUITTGlyph::createGlyphImage(const FT_Bitmap& bits, video::IVide const u32 image_pitch = image->getPitch() / sizeof(u32); u32* image_data = (u32*)image->lock(); u8* glyph_data = bits.buffer; - for (s32 y = 0; y < bits.rows; ++y) + for (u32 y = 0; y < bits.rows; ++y) { u8* row = glyph_data; - for (s32 x = 0; x < bits.width; ++x) + for (u32 x = 0; x < bits.width; ++x) { image_data[y * image_pitch + x] |= static_cast<u32>(255.0f * (static_cast<float>(*row++) / gray_count)) << 24; //data[y * image_pitch + x] |= ((u32)(*bitsdata++) << 24); |