From: Matthew Fernandez Date: Sat, 9 Apr 2022 17:37:20 +0000 (-0700) Subject: gvedit: remove unnecessary parens X-Git-Tag: 4.0.0~62^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4e9a390d0431b7966fd7646107d6ebda3a80eda9;p=graphviz gvedit: remove unnecessary parens --- diff --git a/cmd/gvedit/csettings.cpp b/cmd/gvedit/csettings.cpp index 7bfcc39d5..3b0cee0c2 100644 --- a/cmd/gvedit/csettings.cpp +++ b/cmd/gvedit/csettings.cpp @@ -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 diff --git a/cmd/gvedit/mainwindow.cpp b/cmd/gvedit/mainwindow.cpp index b36656dab..782e484b5 100644 --- a/cmd/gvedit/mainwindow.cpp +++ b/cmd/gvedit/mainwindow.cpp @@ -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);