Commit e7bffe5dab9687bb318f11c8abded35829c333aa

henry 2002-12-19T10:27:16

Made return values const

diff --git a/include/FTVectoriser.h b/include/FTVectoriser.h
index e5ca95c..dc751bc 100644
--- a/include/FTVectoriser.h
+++ b/include/FTVectoriser.h
@@ -87,7 +87,7 @@ class FTGL_EXPORT FTMesh
         
         unsigned int TesselationCount() const { return tesselationList.size();}
 
-        FTTesselation* Tesselation( unsigned int index) const { return tesselationList[index];}
+        const FTTesselation* const Tesselation( unsigned int index) const;
 
         /**
          * Get the GL ERROR returned by the glu tesselator
@@ -160,7 +160,7 @@ class FTGL_EXPORT FTVectoriser
         /**
          * Get the current mesh.
          */
-        FTMesh* GetMesh() const { return mesh;}
+        const FTMesh* const GetMesh() const { return mesh;}
         
         /**
          * Get the total count of points in this outline
@@ -177,11 +177,11 @@ class FTGL_EXPORT FTVectoriser
         size_t ContourCount() const { return ftContourCount;}
 
         /**
-         * Get the count of contours in this outline
+         * Return a contour at index
          *
          * @return the number of contours
          */
-         FTContour* Contour( unsigned int index) const { return contourList[index];}
+         const FTContour* const Contour( unsigned int index) const;
 
         /**
          * Get the number of points in a specific contour in this outline
diff --git a/src/FTVectoriser.cpp b/src/FTVectoriser.cpp
index e7ce135..982cd9e 100644
--- a/src/FTVectoriser.cpp
+++ b/src/FTVectoriser.cpp
@@ -52,7 +52,8 @@ void CALLBACK ftglCombine( FTGL_DOUBLE coords[3], void* vertex_data[4], GLfloat 
         
 
 FTMesh::FTMesh()
-:   err(0)
+:	currentTesselation(0),
+    err(0)
 {
     tesselationList.reserve( 16);
     tempPointList.reserve( 128);
@@ -89,6 +90,11 @@ void FTMesh::End()
 }
 
 
+const FTTesselation* const FTMesh::Tesselation( unsigned int index) const
+{
+    return ( index < tesselationList.size()) ? tesselationList[index] : NULL;
+}
+
 FTVectoriser::FTVectoriser( const FT_Glyph glyph)
 :   contourList(0),
     mesh(0),
@@ -149,7 +155,7 @@ void FTVectoriser::ProcessContours()
 
 size_t FTVectoriser::PointCount()
 {
-    int s = 0;
+    size_t s = 0;
     for( size_t c = 0; c < ContourCount(); ++c)
     {
         s += contourList[c]->PointCount();
@@ -159,6 +165,12 @@ size_t FTVectoriser::PointCount()
 }
 
 
+const FTContour* const FTVectoriser::Contour( unsigned int index) const
+{
+    return ( index < ContourCount()) ? contourList[index] : NULL;
+}
+
+
 void FTVectoriser::MakeMesh( FTGL_DOUBLE zNormal)
 {
     if( mesh)