[GRASS-SVN] r31173 - grass/trunk/general/g.mkfontcap

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Apr 29 14:23:44 EDT 2008


Author: pkelly
Date: 2008-04-29 14:23:44 -0400 (Tue, 29 Apr 2008)
New Revision: 31173

Modified:
   grass/trunk/general/g.mkfontcap/freetype_fonts.c
   grass/trunk/general/g.mkfontcap/stroke_fonts.c
Log:
Remove unnecessary casts of G_realloc() (also improves formatting prior to 
running indent)


Modified: grass/trunk/general/g.mkfontcap/freetype_fonts.c
===================================================================
--- grass/trunk/general/g.mkfontcap/freetype_fonts.c	2008-04-29 13:43:08 UTC (rev 31172)
+++ grass/trunk/general/g.mkfontcap/freetype_fonts.c	2008-04-29 18:23:44 UTC (rev 31173)
@@ -115,8 +115,7 @@
                 if (totalfonts >= maxfonts)
                 {
 	            maxfonts += 20;
-		    fontcap = (struct GFONT_CAP *) G_realloc(fontcap, 
-		                         maxfonts * sizeof(struct GFONT_CAP));
+		    fontcap = G_realloc(fontcap, maxfonts * sizeof(struct GFONT_CAP));
                 }
 
 	        if (FT_New_Face(ftlibrary, filepath, index, &face) == 0)

Modified: grass/trunk/general/g.mkfontcap/stroke_fonts.c
===================================================================
--- grass/trunk/general/g.mkfontcap/stroke_fonts.c	2008-04-29 13:43:08 UTC (rev 31172)
+++ grass/trunk/general/g.mkfontcap/stroke_fonts.c	2008-04-29 18:23:44 UTC (rev 31173)
@@ -67,8 +67,7 @@
     	if (totalfonts >= maxfonts)
     	{
     	    maxfonts += 20;   
-            fontcap = (struct GFONT_CAP *) G_realloc(fontcap, 
-		                         maxfonts * sizeof(struct GFONT_CAP));
+            fontcap = G_realloc(fontcap, maxfonts * sizeof(struct GFONT_CAP));
     	}        
        
         /* Path */
@@ -137,8 +136,8 @@
         if( num_descriptions >= memsize )
 	{
 	    memsize += 20;
-	    font_descriptions = (struct font_desc *) G_realloc( 
-		      font_descriptions, memsize * sizeof(struct font_desc) );
+	    font_descriptions = G_realloc(font_descriptions,
+					  memsize * sizeof(struct font_desc) );
 	}
        
         font_descriptions[num_descriptions].filename = G_store(name);



More information about the grass-commit mailing list