]> granicus.if.org Git - graphviz/commitdiff
textspan.c: [nfc] remove unnecessary casts
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 2 Feb 2022 11:50:47 +0000 (22:50 +1100)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 4 Feb 2022 05:58:19 +0000 (16:58 +1100)
lib/common/textspan.c

index bfde2afbec00acc1d02beaf003620177d475fe37..f9c60b259246c87c7f7cc62f6c36b71cd103ab0f 100644 (file)
@@ -105,7 +105,7 @@ static void* textfont_makef(Dt_t* dt, void* obj, Dtdisc_t* disc)
     (void)dt;
     (void)disc;
 
-    textfont_t *f1 = (textfont_t*)obj;
+    textfont_t *f1 = obj;
     textfont_t *f2 = calloc(1,sizeof(textfont_t));
     
     /* key */
@@ -125,7 +125,7 @@ static void textfont_freef(Dt_t* dt, void* obj, Dtdisc_t* disc)
     (void)dt;
     (void)disc;
 
-    textfont_t *f = (textfont_t*)obj;
+    textfont_t *f = obj;
 
     free(f->name);
     free(f->color);
@@ -138,7 +138,7 @@ static int textfont_comparf (Dt_t* dt, void* key1, void* key2, Dtdisc_t* disc)
     (void)disc;
 
     int rc;
-    textfont_t *f1 = (textfont_t*)key1, *f2 = (textfont_t*)key2;
+    textfont_t *f1 = key1, *f2 = key2;
 
     if (f1->name || f2->name) {
         if (! f1->name) return -1;