From 9a8a1795fb7eef9efc5a638af93fa47a5f04880b Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 30 Jun 2022 13:14:03 +0200 Subject: [PATCH] Mesh: fix (Qt) issues found by clang's clazy tool --- src/Mod/Mesh/Gui/DlgEvaluateMeshImp.cpp | 4 ++-- src/Mod/Mesh/Gui/ViewProviderCurvature.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Mod/Mesh/Gui/DlgEvaluateMeshImp.cpp b/src/Mod/Mesh/Gui/DlgEvaluateMeshImp.cpp index 941dd782a1..184f6a7f2c 100644 --- a/src/Mod/Mesh/Gui/DlgEvaluateMeshImp.cpp +++ b/src/Mod/Mesh/Gui/DlgEvaluateMeshImp.cpp @@ -335,7 +335,7 @@ void DlgEvaluateMeshImp::on_meshNameButton_activated(int i) void DlgEvaluateMeshImp::refreshList() { - QList > items; + QVector > items; if (this->getDocument()) { std::vector objs = this->getDocument()->getObjectsOfType(Mesh::Feature::getClassTypeId()); for (std::vector::iterator it = objs.begin(); it != objs.end(); ++it) { @@ -346,7 +346,7 @@ void DlgEvaluateMeshImp::refreshList() d->ui.meshNameButton->clear(); d->ui.meshNameButton->addItem(tr("No selection")); - for (QList >::iterator it = items.begin(); it != items.end(); ++it) + for (QVector >::iterator it = items.begin(); it != items.end(); ++it) d->ui.meshNameButton->addItem(it->first, it->second); d->ui.meshNameButton->setDisabled(items.empty()); cleanInformation(); diff --git a/src/Mod/Mesh/Gui/ViewProviderCurvature.cpp b/src/Mod/Mesh/Gui/ViewProviderCurvature.cpp index 86d5aa8cdd..294a71a010 100644 --- a/src/Mod/Mesh/Gui/ViewProviderCurvature.cpp +++ b/src/Mod/Mesh/Gui/ViewProviderCurvature.cpp @@ -93,7 +93,7 @@ ViewProviderMeshCurvature::ViewProviderMeshCurvature() pcColorRoot->ref(); pcColorMat = new SoMaterial; pcColorMat->ref(); - pcColorStyle = new SoDrawStyle(); + pcColorStyle = new SoDrawStyle(); pcColorRoot->addChild(pcColorStyle); // simple color bar pcColorBar = new Gui::SoFCColorBar; @@ -181,7 +181,7 @@ void ViewProviderMeshCurvature::init(const Mesh::PropertyCurvatureList* pCurvInf aMaxValues.push_back( jt->fMaxCurvature ); } - if ( aMinValues.empty() || aMaxValues.empty() ) + if ( aMinValues.empty() || aMaxValues.empty() ) return; // no values inside float fMin = *std::min_element( aMinValues.begin(), aMinValues.end() );