]> granicus.if.org Git - graphviz/commitdiff
remove unnecessary 'usershape_t.data' casts
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 21 Sep 2022 04:47:44 +0000 (21:47 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 3 Oct 2022 00:31:38 +0000 (17:31 -0700)
plugin/core/gvloadimage_core.c
plugin/gdk/gvloadimage_gdk.c
plugin/quartz/gvloadimage_quartz.c

index f8b7ddd365222f96e47ecbcb901907bd46342988..149698668a7859ba6d9e6ad899b6b6102cc85fb4 100644 (file)
@@ -221,7 +221,7 @@ static void core_loadimage_pslib(GVJ_t * job, usershape_t *us, boxf b, bool fill
     assert(us);
     assert(us->name);
 
-    if ((shape = (shape_desc*)us->data)) {
+    if ((shape = us->data)) {
        AF[0] = b.LL;
        AF[2] = b.UR;
        AF[1].x = AF[0].x;
index da63c856f6af944378150c085b5ed5a5bb397ea6..a86d79257625265e5400bf4f022b2855d340269d 100644 (file)
@@ -126,7 +126,7 @@ static cairo_surface_t* gdk_loadimage(GVJ_t * job, usershape_t *us)
              us->data = NULL;
 #else /* HAVE_CAIRO_SURFACE_SET_MIME_DATA */
         if (us->datafree == gdk_freeimage) {
-           cairo_image = cairo_surface_reference ((cairo_surface_t *)(us->data)); /* use cached data */
+           cairo_image = cairo_surface_reference(us->data); /* use cached data */
        } else {
            us->datafree(us);        /* free incompatible cache data */
            us->datafree = NULL;
index 6b41abe9e7f3a47939b0faca8d8f3236811be207..1dd5f882210a5aa248f94ce5e91145e1ff2b240f 100644 (file)
@@ -67,7 +67,7 @@ static CGDataProviderCallbacks file_data_provider_callbacks = {
 
 static void quartz_freeimage(usershape_t *us)
 {
-       CGImageRelease((CGImageRef)us->data);
+       CGImageRelease(us->data);
 }
 
 static CGImageRef quartz_loadimage(GVJ_t * job, usershape_t *us)
@@ -152,7 +152,7 @@ static CGImageRef quartz_loadimage(GVJ_t * job, usershape_t *us)
                        
                gvusershape_file_release(us);
     }
-    return (CGImageRef)(us->data);
+    return us->data;
 }
 
 static void quartz_loadimage_quartz(GVJ_t * job, usershape_t *us, boxf b, bool filled)