Commit c33e0bff2237613ceaf6226692a85790981d177f

henry 2002-12-11T09:29:47

Minor change to bbox functions

diff --git a/src/FTFont.cpp b/src/FTFont.cpp
index d2a0930..b52a31c 100755
--- a/src/FTFont.cpp
+++ b/src/FTFont.cpp
@@ -125,7 +125,6 @@ float FTFont::Descender() const
 void FTFont::BBox( const char* string,
                    float& llx, float& lly, float& llz, float& urx, float& ury, float& urz)
 {
-    const unsigned char* c = (unsigned char*)string;
     llx = lly = llz = urx = ury = urz = 0.0f;
     
     if( !*string)
@@ -133,6 +132,8 @@ void FTFont::BBox( const char* string,
         return;
     }
     
+    const unsigned char* c = (unsigned char*)string;
+
     FTBBox bbox;
  
     while( *c)
@@ -167,7 +168,6 @@ void FTFont::BBox( const char* string,
 void FTFont::BBox( const wchar_t* string,
                    float& llx, float& lly, float& llz, float& urx, float& ury, float& urz)
 {
-    const wchar_t* c = string;
     llx = lly = llz = urx = ury = urz = 0.0f;
     
     if( !*string)
@@ -175,6 +175,7 @@ void FTFont::BBox( const wchar_t* string,
         return;
     }
 
+    const wchar_t* c = string;
     FTBBox bbox;
  
     while( *c)