]> granicus.if.org Git - graphviz/commitdiff
gvc: [nfc] remove unnecessary 'gvplugin_installed_t.engine' casts
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 28 Feb 2022 02:37:59 +0000 (18:37 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 5 Mar 2022 19:17:36 +0000 (11:17 -0800)
lib/gvc/gvlayout.c
lib/gvc/gvloadimage.c
lib/gvc/gvrender.c
lib/gvc/gvtextlayout.c

index be7fb35a8b1e0a1addbde72c1d6e9d5bbcbc37fa..2b6dd6353e8ae469b2d5b5ca94a7c96bbd87e9bb 100644 (file)
@@ -37,7 +37,7 @@ int gvlayout_select(GVC_t * gvc, const char *layout)
     if (plugin) {
        typeptr = plugin->typeptr;
        gvc->layout.type = typeptr->type;
-       gvc->layout.engine = (gvlayout_engine_t *) (typeptr->engine);
+       gvc->layout.engine = typeptr->engine;
        gvc->layout.id = typeptr->id;
        gvc->layout.features = (gvlayout_features_t *) (typeptr->features);
        return GVRENDER_PLUGIN;  /* FIXME - need better return code */
index d4f34d6028d9282a5a2954382e52934c0b87d470..8b75c4e863b7945cdb9ea2e30492a9fdee85d483 100644 (file)
@@ -35,7 +35,7 @@ static int gvloadimage_select(GVJ_t * job, char *str)
     plugin = gvplugin_load(job->gvc, API_loadimage, str);
     if (plugin) {
         typeptr = plugin->typeptr;
-        job->loadimage.engine = (gvloadimage_engine_t *) (typeptr->engine);
+        job->loadimage.engine = typeptr->engine;
         job->loadimage.id = typeptr->id;
         return GVRENDER_PLUGIN;
     }
index 53d18a249b915d53a8d9eda59a39441fa0c1718a..75066ab77e19efb9d3d5561aa75a39ba68be7b2d 100644 (file)
@@ -51,7 +51,7 @@ int gvrender_select(GVJ_t * job, const char *str)
     plugin = gvc->api[API_device];
     if (plugin) {
        typeptr = plugin->typeptr;
-       job->device.engine = (gvdevice_engine_t *) (typeptr->engine);
+       job->device.engine = typeptr->engine;
        job->device.features = (gvdevice_features_t *) (typeptr->features);
        job->device.id = typeptr->id;
        job->device.type = plugin->typestr;
@@ -65,7 +65,7 @@ int gvrender_select(GVJ_t * job, const char *str)
     plugin = gvc->api[API_render];
     if (plugin) {
        typeptr = plugin->typeptr;
-       job->render.engine = (gvrender_engine_t *) (typeptr->engine);
+       job->render.engine = typeptr->engine;
        job->render.features = (gvrender_features_t *) (typeptr->features);
        job->render.type = plugin->typestr;
 
index c436bc5de6164ae628682e69bdc1288d296059fa..df6b4fce167aa7dbbb1829a5ce88b0725ab52dc9 100644 (file)
@@ -28,7 +28,7 @@ int gvtextlayout_select(GVC_t * gvc)
     plugin = gvplugin_load(gvc, API_textlayout, "textlayout");
     if (plugin) {
        typeptr = plugin->typeptr;
-       gvc->textlayout.engine = (gvtextlayout_engine_t *) (typeptr->engine);
+       gvc->textlayout.engine = typeptr->engine;
        return GVRENDER_PLUGIN;  /* FIXME - need more suitable success code */
     }
     return NO_SUPPORT;