Mesh: fix (Qt) issues found by clang's clazy tool

This commit is contained in:
wmayer
2022-06-30 13:14:03 +02:00
parent 316352fa50
commit 9a8a1795fb
2 changed files with 4 additions and 4 deletions

View File

@@ -335,7 +335,7 @@ void DlgEvaluateMeshImp::on_meshNameButton_activated(int i)
void DlgEvaluateMeshImp::refreshList()
{
QList<QPair<QString, QString> > items;
QVector<QPair<QString, QString> > items;
if (this->getDocument()) {
std::vector<App::DocumentObject*> objs = this->getDocument()->getObjectsOfType(Mesh::Feature::getClassTypeId());
for (std::vector<App::DocumentObject*>::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<QPair<QString, QString> >::iterator it = items.begin(); it != items.end(); ++it)
for (QVector<QPair<QString, QString> >::iterator it = items.begin(); it != items.end(); ++it)
d->ui.meshNameButton->addItem(it->first, it->second);
d->ui.meshNameButton->setDisabled(items.empty());
cleanInformation();

View File

@@ -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() );