From 5bdd8584877281d861734e1514239cbd27e9f966 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Mon, 30 Nov 2015 23:36:17 -0400 Subject: [PATCH] Fixed compiler warnings when new versions of FreeType are used. --- src/modules/font/freetype/TrueTypeRasterizer.cpp | 8 ++++---- src/modules/graphics/opengl/Canvas.h | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/modules/font/freetype/TrueTypeRasterizer.cpp b/src/modules/font/freetype/TrueTypeRasterizer.cpp index 29c77fdd6..8d1f4bb56 100644 --- a/src/modules/font/freetype/TrueTypeRasterizer.cpp +++ b/src/modules/font/freetype/TrueTypeRasterizer.cpp @@ -116,9 +116,9 @@ GlyphData *TrueTypeRasterizer::getGlyphData(uint32 glyph) const // We treat the luminance of the FreeType bitmap as alpha in the GlyphData. if (bitmap.pixel_mode == FT_PIXEL_MODE_MONO) { - for (int y = 0; y < bitmap.rows; y++) + for (int y = 0; y < (int) bitmap.rows; y++) { - for (int x = 0; x < bitmap.width; x++) + for (int x = 0; x < (int) bitmap.width; x++) { // Extract the 1-bit value and convert it to uint8. uint8 v = ((pixels[x / 8]) & (1 << (7 - (x % 8)))) ? 255 : 0; @@ -131,9 +131,9 @@ GlyphData *TrueTypeRasterizer::getGlyphData(uint32 glyph) const } else if (bitmap.pixel_mode == FT_PIXEL_MODE_GRAY) { - for (int y = 0; y < bitmap.rows; y++) + for (int y = 0; y < (int) bitmap.rows; y++) { - for (int x = 0; x < bitmap.width; x++) + for (int x = 0; x < (int) bitmap.width; x++) { dest[2 * (y * bitmap.width + x) + 0] = 255; dest[2 * (y * bitmap.width + x) + 1] = pixels[x]; diff --git a/src/modules/graphics/opengl/Canvas.h b/src/modules/graphics/opengl/Canvas.h index 45c5367ee..2db2d4c76 100644 --- a/src/modules/graphics/opengl/Canvas.h +++ b/src/modules/graphics/opengl/Canvas.h @@ -55,13 +55,13 @@ public: FORMAT_RG8, // Two-channel (red and green) with 8 bits per channel. FORMAT_RGBA8, // RGBA with 8 bits per channel. FORMAT_RGB10A2, // RGB with 10 bits each, and A with 2 bits. - FORMAT_RG11B10F, // Floating point [0, +inf]. RG with 11 FP bits each, and B with 10 FP bits. - FORMAT_R16F, // Floating point [-inf, +inf]. R with 16 FP bits. - FORMAT_RG16F, // Floating point [-inf, +inf]. RG with 16 FP bits per channel. - FORMAT_RGBA16F, // Floating point [-inf, +inf]. RGBA with 16 FP bits per channel. - FORMAT_R32F, // Floating point [-inf, +inf]. R with 32 FP bits. - FORMAT_RG32F, // Floating point [-inf, +inf]. RG with 32 FP bits per channel. - FORMAT_RGBA32F, // Floating point [-inf, +inf]. RGBA with 32 FP bits per channel. + FORMAT_RG11B10F, // Floating point [0, +65024]. RG with 11 FP bits each, and B with 10 FP bits. + FORMAT_R16F, // Floating point [-65504, +65504]. R with 16 FP bits. + FORMAT_RG16F, // Floating point [-65504, +65504]. RG with 16 FP bits per channel. + FORMAT_RGBA16F, // Floating point [-65504, +65504]. RGBA with 16 FP bits per channel. + FORMAT_R32F, // Floating point [-65504, +65504]. R with 32 FP bits. + FORMAT_RG32F, // Floating point [-65504, +65504]. RG with 32 FP bits per channel. + FORMAT_RGBA32F, // Floating point [-65504, +65504]. RGBA with 32 FP bits per channel. FORMAT_SRGB, // sRGB with 8 bits per channel, plus 8 bit linear A. FORMAT_MAX_ENUM };