Commit b9933f4b028dc64a6f59569d7ba8b747398b7602

Werner Lemberg 2007-06-01T21:27:12

* src/base/ftobjs.c (FT_Request_Metrics), src/cache/ftccmap.c (FTC_CMapCache_Lookup): Remove unused code.

diff --git a/ChangeLog b/ChangeLog
index 5caf8a8..4852321 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-06-01  Werner Lemberg  <wl@gnu.org>
+
+	* src/base/ftobjs.c (FT_Request_Metrics), src/cache/ftccmap.c
+	(FTC_CMapCache_Lookup): Remove unused code.
+
 2007-06-01  Sean McBride  <sean@rogue-research.com>
 
 	* src/truetype/ttinterp.c (Null_Vector, NULL_Vector): Removed,
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index facee47..798b640 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -2243,16 +2243,16 @@
         w = h = face->ascender - face->descender;
         break;
 
-      case FT_SIZE_REQUEST_TYPE_CELL:
-        w = face->max_advance_width;
-        h = face->ascender - face->descender;
-        break;
-
       case FT_SIZE_REQUEST_TYPE_BBOX:
         w = face->bbox.xMax - face->bbox.xMin;
         h = face->bbox.yMax - face->bbox.yMin;
         break;
 
+      case FT_SIZE_REQUEST_TYPE_CELL:
+        w = face->max_advance_width;
+        h = face->ascender - face->descender;
+        break;
+
       case FT_SIZE_REQUEST_TYPE_SCALES:
         metrics->x_scale = (FT_Fixed)req->width;
         metrics->y_scale = (FT_Fixed)req->height;
@@ -2262,9 +2262,8 @@
           metrics->y_scale = metrics->x_scale;
         goto Calculate_Ppem;
 
-      default:
-        /* this never happens */
-        return;
+      case FT_SIZE_REQUEST_TYPE_MAX:
+        break;
       }
 
       /* to be on the safe side */
diff --git a/src/cache/ftccmap.c b/src/cache/ftccmap.c
index 1568e5e..aa59307 100644
--- a/src/cache/ftccmap.c
+++ b/src/cache/ftccmap.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType CharMap cache (body)                                        */
 /*                                                                         */
-/*  Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006 by                   */
+/*  Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2007 by             */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -341,7 +341,6 @@
 
           return FT_Get_Char_Index( face, char_code );
         }
-        break;
 
       default:
         return 0;