Skip to content

Commit

Permalink
Suppress 4 gcc 4.9.2 warnings in CGUITTFont.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
ngosang authored and Zeno- committed Feb 4, 2015
1 parent b4cdbc9 commit 1b4aaa5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/cguittfont/CGUITTFont.cpp
Expand Up @@ -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.
Expand All @@ -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);
Expand Down

0 comments on commit 1b4aaa5

Please sign in to comment.