]> granicus.if.org Git - graphviz/commitdiff
gvedit: remove unnecessary parens
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 9 Apr 2022 17:37:20 +0000 (10:37 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 28 Apr 2022 01:54:13 +0000 (18:54 -0700)
cmd/gvedit/csettings.cpp
cmd/gvedit/mainwindow.cpp

index 7bfcc39d538ea5186ec87358eeb2ab27b1e4b277..3b0cee0c250f35954790c3e37a937151bdf5db1b 100644 (file)
@@ -45,7 +45,7 @@ QString findAttrFile ()
        return path;
     }
     r = GetModuleFileNameA((HMODULE)mbi.AllocationBase, line, BSZ);
-    if (!r || (r == BSZ)) {
+    if (!r || r == BSZ) {
        errout << "failed to get path for executable.\n";
        return path;
     }
@@ -377,7 +377,7 @@ bool CFrmSettings::renderLayout()
     QString sfx = WIDGET(QComboBox, cbExtension)->currentText();
     QString fileName(WIDGET(QLineEdit, leOutput)->text());
 
-    if ((fileName == QString("")) || (sfx == QString("NONE")))
+    if (fileName == QString("") || sfx == QString("NONE"))
        doPreview(QString());
     else {
        fileName = stripFileExtension(fileName);
@@ -386,7 +386,7 @@ bool CFrmSettings::renderLayout()
            activeWindow->outputFile = fileName;
 
 #ifdef _WIN32
-       if ((!fileName.contains('/')) && (!fileName.contains('\\'))) 
+       if (!fileName.contains('/') && !fileName.contains('\\'))
 #else
        if (!fileName.contains('/'))
 #endif
@@ -476,7 +476,7 @@ int CFrmSettings::runSettings(MdiChild * m)
            return drawGraph();
 
 
-    if ((m) && (m == getActiveWindow())) {
+    if (m && m == getActiveWindow()) {
        if (this->loadGraph(m))
            return drawGraph();
        else
index b36656dab6efaa191af24561b46746e3a0a6bb2b..782e484b5977faf1ccd9ff4498f3d9cdd54d1665 100644 (file)
@@ -42,7 +42,7 @@ static int LoadPlugins(QComboBox * cb, GVC_t * gvc, const char *kind,
     cb->clear();
     for (int id = 0; id < count; id++) {
        cb->addItem(QString(lp[id]));
-       if (prefer && (idx < 0) && !strcmp(prefer, lp[id]))
+       if (prefer && idx < 0 && !strcmp(prefer, lp[id]))
            idx = id;
     };
     freeList(lp, count);