From: Matthew Fernandez Date: Sat, 9 Apr 2022 17:19:31 +0000 (-0700) Subject: gvedit: remove unnecessary casts when calling Graphviz’ own functions X-Git-Tag: 4.0.0~62^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6bcbf5fa671c5152b8b56a32abcbe212227f7f44;p=graphviz gvedit: remove unnecessary casts when calling Graphviz’ own functions --- diff --git a/cmd/gvedit/csettings.cpp b/cmd/gvedit/csettings.cpp index 212bf026a..e1f8746ab 100644 --- a/cmd/gvedit/csettings.cpp +++ b/cmd/gvedit/csettings.cpp @@ -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);