Commit 1f30031f84954d9c657bf5f63be6c94b20ccfef0

henry 2002-12-05T09:33:28

Refactored variables in Process() Changed Process to void Test in FTVectoriser c_stor

diff --git a/include/FTVectoriser.h b/include/FTVectoriser.h
index e489c34..304bb33 100644
--- a/include/FTVectoriser.h
+++ b/include/FTVectoriser.h
@@ -219,10 +219,8 @@ class FTGL_EXPORT FTVectoriser
 
         /**
          * Process the freetype outline data into contours of points
-         *
-         * @return <code>true</code> on success
          */
-        bool Process();
+        void Process();
 
         /**
          * Copy the outline data into a block of <code>FTGL_DOUBLEs</code>
diff --git a/src/FTVectoriser.cpp b/src/FTVectoriser.cpp
index 5e0a486..cc4898f 100644
--- a/src/FTVectoriser.cpp
+++ b/src/FTVectoriser.cpp
@@ -92,7 +92,7 @@ int FTMesh::size() const
     for( size_t t = 0; t < tesselationList.size(); ++t)
     {
         s += tesselationList[t]->size();
-// FIXME What the hell is this for?
+// FIXME What the hell is this for? Data in FTPolyglyph
         ++s;
     }
     return s;
@@ -108,10 +108,13 @@ FTVectoriser::FTVectoriser( const FT_Glyph glyph)
     contourFlag(0),
     kBSTEPSIZE( 0.2f)
 {
-    FT_OutlineGlyph outline = (FT_OutlineGlyph)glyph;
-    ftOutline = outline->outline;
+    if( glyph)
+    {
+        FT_OutlineGlyph outline = (FT_OutlineGlyph)glyph;
+        ftOutline = outline->outline;
     
-    contourList.reserve( ftOutline.n_contours);
+        contourList.reserve( ftOutline.n_contours);
+    }
 }
 
 
@@ -141,13 +144,13 @@ int FTVectoriser::points()
 }
 
 
-bool FTVectoriser::Process()
+void FTVectoriser::Process()
 {
     short first = 0;
     short last;
-    const short cont = ftOutline.n_contours;
+    const short contourCount = ftOutline.n_contours;
     
-    for( short c = 0; c < cont; ++c)
+    for( short c = 0; c < contourCount; ++c)
     {
         contour = new FTContour;
         contourFlag = ftOutline.flags;
@@ -172,8 +175,6 @@ bool FTVectoriser::Process()
         contourList.push_back( contour);
         first = last + 1;
     }
-    
-    return true;
 }