Fix a few compiler warnings, patch courtesy of packadal@gmail.com.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167
diff --git a/src/FTFont/FTFont.cpp b/src/FTFont/FTFont.cpp
index 4a9c232..610e8ee 100644
--- a/src/FTFont/FTFont.cpp
+++ b/src/FTFont/FTFont.cpp
@@ -309,19 +309,19 @@ unsigned int FTFontImpl::FaceSize() const
void FTFontImpl::Depth(float depth)
{
- ;
+ (void)depth;
}
void FTFontImpl::Outset(float outset)
{
- ;
+ (void)outset;
}
void FTFontImpl::Outset(float front, float back)
{
- ;
+ (void)front; (void)back;
}
diff --git a/src/FTGlyph/FTBitmapGlyph.cpp b/src/FTGlyph/FTBitmapGlyph.cpp
index c74b110..a4b1e15 100644
--- a/src/FTGlyph/FTBitmapGlyph.cpp
+++ b/src/FTGlyph/FTBitmapGlyph.cpp
@@ -109,6 +109,8 @@ FTBitmapGlyphImpl::~FTBitmapGlyphImpl()
const FTPoint& FTBitmapGlyphImpl::RenderImpl(const FTPoint& pen, int renderMode)
{
+ (void)renderMode;
+
if(data)
{
float dx, dy;
diff --git a/src/FTGlyph/FTBufferGlyph.cpp b/src/FTGlyph/FTBufferGlyph.cpp
index 075a636..41c0e56 100644
--- a/src/FTGlyph/FTBufferGlyph.cpp
+++ b/src/FTGlyph/FTBufferGlyph.cpp
@@ -90,6 +90,8 @@ FTBufferGlyphImpl::~FTBufferGlyphImpl()
const FTPoint& FTBufferGlyphImpl::RenderImpl(const FTPoint& pen, int renderMode)
{
+ (void)renderMode;
+
if(has_bitmap)
{
FTPoint pos(buffer->Pos() + pen + corner);
diff --git a/src/FTGlyph/FTGlyph.cpp b/src/FTGlyph/FTGlyph.cpp
index 47103e6..27bd85d 100644
--- a/src/FTGlyph/FTGlyph.cpp
+++ b/src/FTGlyph/FTGlyph.cpp
@@ -80,6 +80,8 @@ FT_Error FTGlyph::Error() const
FTGlyphImpl::FTGlyphImpl(FT_GlyphSlot glyph, bool useList) : err(0)
{
+ (void)useList;
+
if(glyph)
{
bBox = FTBBox(glyph);
diff --git a/src/FTGlyph/FTOutlineGlyph.cpp b/src/FTGlyph/FTOutlineGlyph.cpp
index 4a32296..3755072 100644
--- a/src/FTGlyph/FTOutlineGlyph.cpp
+++ b/src/FTGlyph/FTOutlineGlyph.cpp
@@ -114,6 +114,8 @@ FTOutlineGlyphImpl::~FTOutlineGlyphImpl()
const FTPoint& FTOutlineGlyphImpl::RenderImpl(const FTPoint& pen,
int renderMode)
{
+ (void)renderMode;
+
glTranslatef(pen.Xf(), pen.Yf(), pen.Zf());
if(glList)
{
diff --git a/src/FTGlyph/FTPolygonGlyph.cpp b/src/FTGlyph/FTPolygonGlyph.cpp
index 47d0a31..823b671 100644
--- a/src/FTGlyph/FTPolygonGlyph.cpp
+++ b/src/FTGlyph/FTPolygonGlyph.cpp
@@ -117,6 +117,8 @@ FTPolygonGlyphImpl::~FTPolygonGlyphImpl()
const FTPoint& FTPolygonGlyphImpl::RenderImpl(const FTPoint& pen,
int renderMode)
{
+ (void)renderMode;
+
glTranslatef(pen.Xf(), pen.Yf(), pen.Zf());
if(glList)
{
diff --git a/src/FTLayout/FTSimpleLayout.cpp b/src/FTLayout/FTSimpleLayout.cpp
index 746b47c..864cad7 100644
--- a/src/FTLayout/FTSimpleLayout.cpp
+++ b/src/FTLayout/FTSimpleLayout.cpp
@@ -405,6 +405,8 @@ inline void FTSimpleLayoutImpl::RenderSpaceI(const T *string, const int len,
FTPoint position, int renderMode,
const float extraSpace)
{
+ (void)position;
+
float space = 0.0;
// If there is space to distribute, count the number of spaces
diff --git a/src/FTVectoriser.cpp b/src/FTVectoriser.cpp
index 0b2aa24..28afa69 100644
--- a/src/FTVectoriser.cpp
+++ b/src/FTVectoriser.cpp
@@ -58,6 +58,8 @@ void CALLBACK ftglVertex(void* data, FTMesh* mesh)
void CALLBACK ftglCombine(FTGL_DOUBLE coords[3], void* vertex_data[4], GLfloat weight[4], void** outData, FTMesh* mesh)
{
+ (void)vertex_data; (void)weight;
+
const FTGL_DOUBLE* vertex = static_cast<const FTGL_DOUBLE*>(coords);
*outData = const_cast<FTGL_DOUBLE*>(mesh->Combine(vertex[0], vertex[1], vertex[2]));
}
@@ -118,7 +120,7 @@ void FTMesh::End()
}
-const FTTesselation* const FTMesh::Tesselation(size_t index) const
+FTTesselation const * FTMesh::Tesselation(size_t index) const
{
return (index < tesselationList.size()) ? tesselationList[index] : NULL;
}
@@ -255,7 +257,7 @@ size_t FTVectoriser::PointCount()
}
-const FTContour* const FTVectoriser::Contour(size_t index) const
+FTContour const * FTVectoriser::Contour(size_t index) const
{
return (index < ContourCount()) ? contourList[index] : NULL;
}
diff --git a/src/FTVectoriser.h b/src/FTVectoriser.h
index bd09b43..880d8ba 100644
--- a/src/FTVectoriser.h
+++ b/src/FTVectoriser.h
@@ -155,7 +155,7 @@ class FTMesh
/**
* Get a tesselation by index
*/
- const FTTesselation* const Tesselation(size_t index) const;
+ FTTesselation const * Tesselation(size_t index) const;
/**
* Return the temporary point list. For testing only.
@@ -236,7 +236,7 @@ class FTVectoriser
/**
* Get the current mesh.
*/
- const FTMesh* const GetMesh() const { return mesh; }
+ FTMesh const * GetMesh() const { return mesh; }
/**
* Get the total count of points in this outline
@@ -257,7 +257,7 @@ class FTVectoriser
*
* @return the number of contours
*/
- const FTContour* const Contour(size_t index) const;
+ FTContour const * Contour(size_t index) const;
/**
* Get the number of points in a specific contour in this outline