freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] master 2ecf89b 1/2: */*: s/FT_MEM_ZERO/FT_ZERO/ where approp


From: Werner LEMBERG
Subject: [freetype2] master 2ecf89b 1/2: */*: s/FT_MEM_ZERO/FT_ZERO/ where appropriate.
Date: Wed, 28 Sep 2016 17:11:29 +0000 (UTC)

branch: master
commit 2ecf89b481703315bffa8e0b10c2e970224b52e6
Author: Werner Lemberg <address@hidden>
Commit: Werner Lemberg <address@hidden>

    */*: s/FT_MEM_ZERO/FT_ZERO/ where appropriate.
---
 ChangeLog               |    4 ++++
 src/base/ftglyph.c      |    4 ++--
 src/bdf/bdfdrivr.c      |    2 +-
 src/bdf/bdflib.c        |    2 +-
 src/cff/cf2ft.c         |    2 +-
 src/cff/cffgload.c      |    2 +-
 src/cff/cffload.c       |    8 ++++----
 src/cff/cffobjs.c       |    2 +-
 src/cff/cffparse.c      |    6 +++---
 src/cid/cidload.c       |    2 +-
 src/cid/cidparse.c      |    2 +-
 src/pcf/pcfread.c       |    2 +-
 src/psaux/t1decode.c    |    2 +-
 src/pshinter/pshalgo.c  |    2 +-
 src/pshinter/pshrec.c   |    6 +++---
 src/truetype/ttgload.c  |    4 ++--
 src/truetype/ttinterp.c |    2 +-
 src/truetype/ttobjs.c   |    2 +-
 src/type1/t1load.c      |    2 +-
 src/type42/t42parse.c   |    2 +-
 20 files changed, 32 insertions(+), 28 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index bccd2a8..f5a88f7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2016-09-28  Werner Lemberg  <address@hidden>
+
+       */*: s/FT_MEM_ZERO/FT_ZERO/ where appropriate.
+
 2016-09-27  Werner Lemberg  <address@hidden>
 
        [truetype] Trace number of executed opcodes.
diff --git a/src/base/ftglyph.c b/src/base/ftglyph.c
index dd0f025..d336b1c 100644
--- a/src/base/ftglyph.c
+++ b/src/base/ftglyph.c
@@ -546,8 +546,8 @@
     /* we render the glyph into a glyph bitmap using a `dummy' glyph slot */
     /* then calling FT_Render_Glyph_Internal()                            */
 
-    FT_MEM_ZERO( &dummy, sizeof ( dummy ) );
-    FT_MEM_ZERO( &dummy_internal, sizeof ( dummy_internal ) );
+    FT_ZERO( &dummy );
+    FT_ZERO( &dummy_internal );
     dummy.internal = &dummy_internal;
     dummy.library  = library;
     dummy.format   = clazz->glyph_format;
diff --git a/src/bdf/bdfdrivr.c b/src/bdf/bdfdrivr.c
index e9cb108..6a59e83 100644
--- a/src/bdf/bdfdrivr.c
+++ b/src/bdf/bdfdrivr.c
@@ -439,7 +439,7 @@ THE SOFTWARE.
         FT_Short         resolution_x = 0, resolution_y = 0;
 
 
-        FT_MEM_ZERO( bsize, sizeof ( FT_Bitmap_Size ) );
+        FT_ZERO( bsize );
 
         bsize->height = (FT_Short)( font->font_ascent + font->font_descent );
 
diff --git a/src/bdf/bdflib.c b/src/bdf/bdflib.c
index e1dce95..e919136 100644
--- a/src/bdf/bdflib.c
+++ b/src/bdf/bdflib.c
@@ -1144,7 +1144,7 @@
       }
 
       fp = font->props + font->props_size;
-      FT_MEM_ZERO( fp, sizeof ( bdf_property_t ) );
+      FT_ZERO( fp );
       font->props_size++;
     }
 
diff --git a/src/cff/cf2ft.c b/src/cff/cf2ft.c
index 55f3206..edbe6a7 100644
--- a/src/cff/cf2ft.c
+++ b/src/cff/cf2ft.c
@@ -239,7 +239,7 @@
                     FT_Memory    memory,
                     FT_Error*    error )
   {
-    FT_MEM_ZERO( outline, sizeof ( CF2_OutlineRec ) );
+    FT_ZERO( outline );
 
     outline->root.memory = memory;
     outline->root.error  = error;
diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c
index 4f375a6..f7ddb3c 100644
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -391,7 +391,7 @@
 
 
     /* clear everything */
-    FT_MEM_ZERO( decoder, sizeof ( *decoder ) );
+    FT_ZERO( decoder );
 
     /* initialize builder */
     cff_builder_init( &decoder->builder, face, size, slot, hinting );
diff --git a/src/cff/cffload.c b/src/cff/cffload.c
index 470fa82..ab683e5 100644
--- a/src/cff/cffload.c
+++ b/src/cff/cffload.c
@@ -232,7 +232,7 @@
     FT_UShort  count;
 
 
-    FT_MEM_ZERO( idx, sizeof ( *idx ) );
+    FT_ZERO( idx );
 
     idx->stream = stream;
     idx->start  = FT_STREAM_POS();
@@ -310,7 +310,7 @@
         FT_FRAME_RELEASE( idx->bytes );
 
       FT_FREE( idx->offsets );
-      FT_MEM_ZERO( idx, sizeof ( *idx ) );
+      FT_ZERO( idx );
     }
   }
 
@@ -1330,7 +1330,7 @@
                      0 );
 
     /* set defaults */
-    FT_MEM_ZERO( top, sizeof ( *top ) );
+    FT_ZERO( top );
 
     top->underline_position  = -( 100L << 16 );
     top->underline_thickness = 50L << 16;
@@ -1373,7 +1373,7 @@
     if ( top->private_offset && top->private_size )
     {
       /* set defaults */
-      FT_MEM_ZERO( priv, sizeof ( *priv ) );
+      FT_ZERO( priv );
 
       priv->blue_shift       = 7;
       priv->blue_fuzz        = 1;
diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c
index 0f07696..126bbee 100644
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -114,7 +114,7 @@
     FT_UInt      n, count;
 
 
-    FT_MEM_ZERO( priv, sizeof ( *priv ) );
+    FT_ZERO( priv );
 
     count = priv->num_blue_values = cpriv->num_blue_values;
     for ( n = 0; n < count; n++ )
diff --git a/src/cff/cffparse.c b/src/cff/cffparse.c
index a4f986b..95638b8 100644
--- a/src/cff/cffparse.c
+++ b/src/cff/cffparse.c
@@ -44,7 +44,7 @@
                    FT_UShort   num_designs,
                    FT_UShort   num_axes )
   {
-    FT_MEM_ZERO( parser, sizeof ( *parser ) );
+    FT_ZERO( parser );
 
     parser->top         = parser->stack;
     parser->object_code = code;
@@ -1132,8 +1132,8 @@
         charstring_len = (FT_ULong)( p - charstring_base ) + 1;
 
         /* construct CFF_Decoder object */
-        FT_MEM_ZERO( &decoder, sizeof ( decoder ) );
-        FT_MEM_ZERO( &cff_rec, sizeof ( cff_rec ) );
+        FT_ZERO( &decoder );
+        FT_ZERO( &cff_rec );
 
         cff_rec.top_font.font_dict.num_designs = parser->num_designs;
         cff_rec.top_font.font_dict.num_axes    = parser->num_axes;
diff --git a/src/cid/cidload.c b/src/cid/cidload.c
index 21397c2..a0a5c24 100644
--- a/src/cid/cidload.c
+++ b/src/cid/cidload.c
@@ -570,7 +570,7 @@
   {
     FT_UNUSED( face );
 
-    FT_MEM_ZERO( loader, sizeof ( *loader ) );
+    FT_ZERO( loader );
   }
 
 
diff --git a/src/cid/cidparse.c b/src/cid/cidparse.c
index cb07c45..8dce7f9 100644
--- a/src/cid/cidparse.c
+++ b/src/cid/cidparse.c
@@ -65,7 +65,7 @@
     FT_Byte   *arg1, *arg2;
 
 
-    FT_MEM_ZERO( parser, sizeof ( *parser ) );
+    FT_ZERO( parser );
     psaux->ps_parser_funcs->init( &parser->root, 0, 0, memory );
 
     parser->stream = stream;
diff --git a/src/pcf/pcfread.c b/src/pcf/pcfread.c
index a86b45d..3917a75 100644
--- a/src/pcf/pcfread.c
+++ b/src/pcf/pcfread.c
@@ -1290,7 +1290,7 @@ THE SOFTWARE.
         FT_Short         resolution_x = 0, resolution_y = 0;
 
 
-        FT_MEM_ZERO( bsize, sizeof ( FT_Bitmap_Size ) );
+        FT_ZERO( bsize );
 
         /* for simplicity, we take absolute values of integer properties */
 
diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c
index 98f6ce1..493e3bd 100644
--- a/src/psaux/t1decode.c
+++ b/src/psaux/t1decode.c
@@ -1591,7 +1591,7 @@
                    FT_Render_Mode       hint_mode,
                    T1_Decoder_Callback  parse_callback )
   {
-    FT_MEM_ZERO( decoder, sizeof ( *decoder ) );
+    FT_ZERO( decoder );
 
     /* retrieve PSNames interface from list of current modules */
     {
diff --git a/src/pshinter/pshalgo.c b/src/pshinter/pshalgo.c
index 8f131be..9dabb77 100644
--- a/src/pshinter/pshalgo.c
+++ b/src/pshinter/pshalgo.c
@@ -1162,7 +1162,7 @@
 
 
     /* clear all fields */
-    FT_MEM_ZERO( glyph, sizeof ( *glyph ) );
+    FT_ZERO( glyph );
 
     memory = glyph->memory = globals->memory;
 
diff --git a/src/pshinter/pshrec.c b/src/pshinter/pshrec.c
index d7cc4a0..3aeb265 100644
--- a/src/pshinter/pshrec.c
+++ b/src/pshinter/pshrec.c
@@ -818,7 +818,7 @@
   ps_hints_init( PS_Hints   hints,
                  FT_Memory  memory )
   {
-    FT_MEM_ZERO( hints, sizeof ( *hints ) );
+    FT_ZERO( hints );
     hints->memory = memory;
   }
 
@@ -1140,7 +1140,7 @@
   FT_LOCAL_DEF( void )
   t1_hints_funcs_init( T1_Hints_FuncsRec*  funcs )
   {
-    FT_MEM_ZERO( (char*)funcs, sizeof ( *funcs ) );
+    FT_ZERO( funcs );
 
     funcs->open  = (T1_Hints_OpenFunc)    t1_hints_open;
     funcs->close = (T1_Hints_CloseFunc)   ps_hints_close;
@@ -1206,7 +1206,7 @@
   FT_LOCAL_DEF( void )
   t2_hints_funcs_init( T2_Hints_FuncsRec*  funcs )
   {
-    FT_MEM_ZERO( funcs, sizeof ( *funcs ) );
+    FT_ZERO( funcs );
 
     funcs->open    = (T2_Hints_OpenFunc)   t2_hints_open;
     funcs->close   = (T2_Hints_CloseFunc)  ps_hints_close;
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index 28a5419..17d3036 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -1487,7 +1487,7 @@
       offset            = 0;
       loader->byte_len  = glyph_data.length;
 
-      FT_MEM_ZERO( &inc_stream, sizeof ( inc_stream ) );
+      FT_ZERO( &inc_stream );
       FT_Stream_OpenMemory( &inc_stream,
                             glyph_data.pointer,
                             (FT_ULong)glyph_data.length );
@@ -2252,7 +2252,7 @@
     face   = (TT_Face)glyph->face;
     stream = face->root.stream;
 
-    FT_MEM_ZERO( loader, sizeof ( TT_LoaderRec ) );
+    FT_ZERO( loader );
 
 #ifdef TT_USE_BYTECODE_INTERPRETER
 
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index a379cf8..2bd3fbc 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -423,7 +423,7 @@
 
       /* In case of multi-threading it can happen that the old size object */
       /* no longer exists, thus we must clear all glyph zone references.   */
-      ft_memset( &exec->zp0, 0, sizeof ( exec->zp0 ) );
+      FT_ZERO( &exec->zp0 );
       exec->zp1 = exec->zp0;
       exec->zp2 = exec->zp0;
     }
diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c
index ed3be2d..3e60b55 100644
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -117,7 +117,7 @@
     FT_Error  error;
 
 
-    FT_MEM_ZERO( zone, sizeof ( *zone ) );
+    FT_ZERO( zone );
     zone->memory = memory;
 
     if ( FT_NEW_ARRAY( zone->org,      maxPoints   ) ||
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index e728cf4..aa25919 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -2149,7 +2149,7 @@
   {
     FT_UNUSED( face );
 
-    FT_MEM_ZERO( loader, sizeof ( *loader ) );
+    FT_ZERO( loader );
   }
 
 
diff --git a/src/type42/t42parse.c b/src/type42/t42parse.c
index f948916..9e23a51 100644
--- a/src/type42/t42parse.c
+++ b/src/type42/t42parse.c
@@ -1268,7 +1268,7 @@
   {
     FT_UNUSED( face );
 
-    FT_MEM_ZERO( loader, sizeof ( *loader ) );
+    FT_ZERO( loader );
     loader->num_glyphs = 0;
     loader->num_chars  = 0;
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]