Commit 42d104ae454b61ea139fc401ff3daaa60f943d05

sammy 2010-09-16T22:40:57

Fix a few compiler warnings, patch courtesy of packadal@gmail.com.

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