Commit 681596b9efb45bc438c3ab936a028764c52aeff6

henry 2002-01-24T09:42:21

Fixed compiler warnings (size_t)

diff --git a/include/FTVectoriser.h b/include/FTVectoriser.h
index cad50df..a568c28 100644
--- a/include/FTVectoriser.h
+++ b/include/FTVectoriser.h
@@ -126,7 +126,7 @@ class FTGL_EXPORT FTContour
 		 *
 		 * @return the number of points in this contour
 		 */
-		int size() const { return pointList.size();}
+		size_t size() const { return pointList.size();}
 
 		/**
 		 *	The list of points in this contour
@@ -163,7 +163,7 @@ class FTGL_EXPORT FTTesselation
 		}
 
 
-		int size() const { return pointList.size();}
+		size_t size() const { return pointList.size();}
 
 		GLenum meshType;
 		vector<ftPoint> pointList;
@@ -261,7 +261,7 @@ class FTGL_EXPORT FTVectoriser
 		 *
 		 * @return the number of points.
 		 */
-		int MeshPoints() const { return mesh->size();}
+		size_t MeshPoints() const { return mesh->size();}
 		
 		/**
 		 * Get the total count of points in this outline
@@ -275,7 +275,7 @@ class FTGL_EXPORT FTVectoriser
 		 *
 		 * @return the number of contours
 		 */
-		int contours() const { return contourList.size();}
+		size_t contours() const { return contourList.size();}
 
 		/**
 		 * Get the nuber of points in a contour in this outline
@@ -283,7 +283,7 @@ class FTGL_EXPORT FTVectoriser
 		 * @param c		The contour index
 		 * @return		the number of points in contour[c]
 		 */
-		int contourSize( int c) const { return contourList[c]->size();}
+		size_t contourSize( int c) const { return contourList[c]->size();}
 
 		/**
 		 * Get the flag for the tesselation rule for this outline
diff --git a/src/FTVectoriser.cpp b/src/FTVectoriser.cpp
index 8e2bb8f..263b6bc 100644
--- a/src/FTVectoriser.cpp
+++ b/src/FTVectoriser.cpp
@@ -67,7 +67,7 @@ FTMesh::FTMesh()
 
 FTMesh::~FTMesh()
 {
-	for( int t = 0; t < tess.size(); ++t)
+	for( size_t t = 0; t < tess.size(); ++t)
 	{
 		delete tess[t];
 	}
@@ -105,7 +105,7 @@ FTGL_DOUBLE* FTMesh::Point()
 int FTMesh::size() const
 {
 	int s = 0;
-	for( int t = 0; t < tess.size(); ++t)
+	for( size_t t = 0; t < tess.size(); ++t)
 	{
 		s += tess[t]->size();
 		++s;
@@ -132,7 +132,7 @@ FTVectoriser::FTVectoriser( const FT_Glyph glyph)
 
 FTVectoriser::~FTVectoriser()
 {
-	for( int c = 0; c < contours(); ++c)
+	for( size_t c = 0; c < contours(); ++c)
 	{
 		delete contourList[c];
 	}
@@ -147,7 +147,7 @@ FTVectoriser::~FTVectoriser()
 int FTVectoriser::points()
 {
 	int s = 0;
-	for( int c = 0; c < contours(); ++c)
+	for( size_t c = 0; c < contours(); ++c)
 	{
 		s += contourList[c]->size();
 	}
@@ -306,11 +306,11 @@ void FTVectoriser::GetOutline( FTGL_DOUBLE* data)
 {
 	int i = 0;
 	
-	for( int c= 0; c < contours(); ++c)
+	for( size_t c= 0; c < contours(); ++c)
 	{
 		const FTContour* contour = contourList[c];
 		
-		for( int p = 0; p < contour->size(); ++p)
+		for( size_t p = 0; p < contour->size(); ++p)
 		{
 			data[i] = static_cast<FTGL_DOUBLE>(contour->pointList[p].x / 64.0f); // is 64 correct?
 			data[i + 1] = static_cast<FTGL_DOUBLE>(contour->pointList[p].y / 64.0f);
@@ -353,12 +353,12 @@ void FTVectoriser::MakeMesh( int zNormal)
 	gluTessNormal( tobj, 0.0, 0.0, zNormal);
 	gluTessBeginPolygon( tobj, mesh);
 	
-		for( int c = 0; c < contours(); ++c)
+		for( size_t c = 0; c < contours(); ++c)
 		{
 			const FTContour* contour = contourList[c];
 			gluTessBeginContour( tobj);
 			
-				for( int p = 0; p < contour->size(); ++p)
+				for( size_t p = 0; p < contour->size(); ++p)
 				{
 					FTGL_DOUBLE* d = const_cast<FTGL_DOUBLE*>(&contour->pointList[p].x);
 					gluTessVertex( tobj, d, d);
@@ -379,19 +379,19 @@ void FTVectoriser::GetMesh( FTGL_DOUBLE* data)
 	int i = 0;
 	
 	// fill out the header
-	int msize = mesh->tess.size();
+	size_t msize = mesh->tess.size();
 	data[0] = msize;
 	
 	for( int p = 0; p < data[0]; ++p)
 	{
 		FTTesselation* tess = mesh->tess[p];
-		int tSize =  tess->pointList.size();
+		size_t tSize =  tess->pointList.size();
 		int tType =  tess->meshType;
 		
 		data[i+1] = tType;
 		data[i+2] = tSize;
 		i += 3;
-		for( int q = 0; q < ( tess->pointList.size()); ++q)
+		for( size_t q = 0; q < ( tess->pointList.size()); ++q)
 		{
 			data[i] = tess->pointList[q].x / 64.0f; // is 64 correct?
 			data[i + 1] = tess->pointList[q].y / 64.0f;