Commit e0f39aefdecd7393b6f4632f86332556a58aa0f1

Werner Lemberg 2013-08-28T17:34:01

[autofit] Fix C++ compilation. * src/autofit/afglobal.c (af_face_globals_get_metrics), src/autofit/afdummy.c (af_dflt_script_class), src/autofit/afindic.c (af_deva_script_class): Use proper casts.

diff --git a/ChangeLog b/ChangeLog
index eb1a97d..d277fb0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-08-28  Werner Lemberg  <wl@gnu.org>
+
+	[autofit] Fix C++ compilation.
+
+	* src/autofit/afglobal.c (af_face_globals_get_metrics),
+	src/autofit/afdummy.c (af_dflt_script_class), src/autofit/afindic.c
+	(af_deva_script_class): Use proper casts.
+
 2013-08-27  Behdad Esfahbod  <behdad@google.com>
 
 	* src/sfnt/ttload.c (tt_face_load_font_dir): Fix sign typos.
diff --git a/src/autofit/afdummy.c b/src/autofit/afdummy.c
index f2aaede..aaa034d 100644
--- a/src/autofit/afdummy.c
+++ b/src/autofit/afdummy.c
@@ -72,7 +72,7 @@
     af_dflt_script_class,
 
     AF_SCRIPT_DFLT,
-    0,
+    (AF_Blue_Stringset)0,
     AF_WRITING_SYSTEM_DUMMY,
 
     NULL,
diff --git a/src/autofit/afglobal.c b/src/autofit/afglobal.c
index 12b6e03..90cc0be 100644
--- a/src/autofit/afglobal.c
+++ b/src/autofit/afglobal.c
@@ -263,7 +263,7 @@
   {
     AF_ScriptMetrics  metrics = NULL;
 
-    AF_Script              script = options & 15;
+    AF_Script              script = (AF_Script)( options & 15 );
     AF_WritingSystemClass  writing_system_class;
     AF_ScriptClass         script_class;
 
@@ -279,7 +279,7 @@
     /* if we have a forced script (via `options'), use it, */
     /* otherwise look into `glyph_scripts' array           */
     if ( script == AF_SCRIPT_DFLT || script + 1 >= AF_SCRIPT_MAX )
-      script = globals->glyph_scripts[gindex] & AF_SCRIPT_NONE;
+      script = (AF_Script)( globals->glyph_scripts[gindex] & AF_SCRIPT_NONE );
 
     script_class         = AF_SCRIPT_CLASSES_GET[script];
     writing_system_class = AF_WRITING_SYSTEM_CLASSES_GET
diff --git a/src/autofit/afindic.c b/src/autofit/afindic.c
index 3ed04e4..ef8299f 100644
--- a/src/autofit/afindic.c
+++ b/src/autofit/afindic.c
@@ -158,7 +158,7 @@
     af_deva_script_class,
 
     AF_SCRIPT_DEVA,
-    0, /* XXX */
+    (AF_Blue_Stringset)0, /* XXX */
     AF_WRITING_SYSTEM_INDIC,
 
     af_deva_uniranges,