]> granicus.if.org Git - graphviz/commitdiff
gvedit: remove unnecessary casts when calling Graphviz’ own functions
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 9 Apr 2022 17:19:31 +0000 (10:19 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 28 Apr 2022 01:54:13 +0000 (18:54 -0700)
cmd/gvedit/csettings.cpp

index 212bf026aa0edb4081ac6b29ca280b710b240e16..e1f8746ab36e89f5b0b67ec85bf37e6c05d42250 100644 (file)
@@ -341,7 +341,7 @@ bool CFrmSettings::createLayout()
     layout=WIDGET(QComboBox, cbLayout)->currentText();
 
 
-    gvLayout(gvc, G, (char *)layout.toUtf8().constData());     /* library function */
+    gvLayout(gvc, G, layout.toUtf8().constData());     /* library function */
     return true;
 }
 
@@ -365,8 +365,7 @@ void CFrmSettings::doPreview(QString fileName)
 
     if ((fileName.isNull()) || !(getActiveWindow()->loadPreview(fileName))) {  //create preview
        QString prevFile(buildTempFile());
-       gvRenderFilename(gvc, graph, "png",
-                        (char *) prevFile.toUtf8().constData());
+       gvRenderFilename(gvc, graph, "png", prevFile.toUtf8().constData());
        getActiveWindow()->loadPreview(prevFile);
     }
 }
@@ -406,9 +405,8 @@ bool CFrmSettings::renderLayout()
            }
        }
 
-       if (gvRenderFilename
-           (gvc, graph, (char *) sfx.toUtf8().constData(),
-            (char *) fileName.toUtf8().constData()))
+       if (gvRenderFilename(gvc, graph, sfx.toUtf8().constData(),
+                            fileName.toUtf8().constData()))
            return false;
 
        doPreview(fileName);