From f762d81b38b0fceb895d42a33f92af709c30a57a Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 24 Mar 2020 17:41:12 +0200 Subject: [PATCH] Cppcheck warnings. --- src/app/valentina/mainwindowsnogui.cpp | 3 +-- src/libs/vwidgets/vlineedit.cpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/app/valentina/mainwindowsnogui.cpp b/src/app/valentina/mainwindowsnogui.cpp index 3f1c61887..559a02dcd 100644 --- a/src/app/valentina/mainwindowsnogui.cpp +++ b/src/app/valentina/mainwindowsnogui.cpp @@ -404,8 +404,7 @@ bool MainWindowsNoGUI::GenerateLayout(VLayoutGenerator& lGenerator) || (nestingState == LayoutErrors::NoError && not qFuzzyIsNull(lGenerator.GetEfficiencyCoefficient()) && efficiency >= lGenerator.GetEfficiencyCoefficient())) { - if (not lGenerator.IsPreferOneSheetSolution() - || (lGenerator.IsPreferOneSheetSolution() && lGenerator.PapersCount() == 1)) + if (not lGenerator.IsPreferOneSheetSolution() || lGenerator.PapersCount() == 1) { break; } diff --git a/src/libs/vwidgets/vlineedit.cpp b/src/libs/vwidgets/vlineedit.cpp index 623c5c3aa..1bbc81298 100644 --- a/src/libs/vwidgets/vlineedit.cpp +++ b/src/libs/vwidgets/vlineedit.cpp @@ -41,7 +41,7 @@ namespace class MultiSelectCompleter : public QCompleter { public: - MultiSelectCompleter(QObject* parent=nullptr); + explicit MultiSelectCompleter(QObject* parent=nullptr); MultiSelectCompleter(const QStringList& items, QObject* parent=nullptr); virtual ~MultiSelectCompleter() =default;