From 9d2edfe5248fce8b16693fad8304f94a1f101bab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Martins?= Date: Sat, 29 Nov 2014 21:15:07 +0000 Subject: [PATCH] Fix build due to source incompatible change with FreeType 2.5.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=b3500af717010137046ec4076d1e1c0641e33727 ../gui/text/qfontengine_ft.cpp: In member function ‘QFontEngineFT::Glyph* QFontEngineFT::loadGlyph(QFontEngineFT::QGlyphSet*, uint, QFixed, QFontEngine::GlyphFormat, bool) const’: ../gui/text/qfontengine_ft.cpp:1126:39: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] for (int x = 0; x < slot->bitmap.width; x++) { Change-Id: Idb58f9e5895aac8c02163870d7c7d4a49237086b Reviewed-by: Konstantin Ritt Reviewed-by: Thiago Macieira Reviewed-by: Shawn Rutledge --- src/gui/text/qfontengine_ft.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp index 8191629003..44c0a50bfc 100644 --- a/src/gui/text/qfontengine_ft.cpp +++ b/src/gui/text/qfontengine_ft.cpp @@ -1123,7 +1123,7 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph, while (h--) { uint *dd = (uint *)dst; *dd++ = 0; - for (int x = 0; x < slot->bitmap.width; x++) { + for (int x = 0; x < static_cast(slot->bitmap.width); x++) { uint a = ((src[x >> 3] & (0x80 >> (x & 7))) ? 0xffffff : 0x000000); *dd++ = a; } @@ -1134,7 +1134,7 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph, } else if (vfactor != 1) { while (h--) { uint *dd = (uint *)dst; - for (int x = 0; x < slot->bitmap.width; x++) { + for (int x = 0; x < static_cast(slot->bitmap.width); x++) { uint a = ((src[x >> 3] & (0x80 >> (x & 7))) ? 0xffffff : 0x000000); *dd++ = a; } @@ -1143,7 +1143,7 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph, } } else { while (h--) { - for (int x = 0; x < slot->bitmap.width; x++) { + for (int x = 0; x < static_cast(slot->bitmap.width); x++) { unsigned char a = ((src[x >> 3] & (0x80 >> (x & 7))) ? 0xff : 0x00); dst[x] = a; }