diff --git a/src/Mod/Fem/Gui/TaskFemConstraintDisplacement.cpp b/src/Mod/Fem/Gui/TaskFemConstraintDisplacement.cpp index 0e45d52010..19f9c4f623 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintDisplacement.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintDisplacement.cpp @@ -445,8 +445,8 @@ void TaskFemConstraintDisplacement::addToSelection() searchStr = "Edge"; else searchStr = "Face"; - for (unsigned int iStr = 0; iStr < (SubElements.size()); ++iStr){ - if ((SubElements[iStr].find(searchStr) == std::string::npos) && (SubElements.size() > 0)){ + for (size_t iStr = 0; iStr < (SubElements.size()); ++iStr){ + if (SubElements[iStr].find(searchStr) == std::string::npos){ QString msg = tr("Only one type of selection (vertex,face or edge) per constraint allowed!"); QMessageBox::warning(this, tr("Selection error"), msg); addMe=false; diff --git a/src/Mod/Fem/Gui/TaskFemConstraintFixed.cpp b/src/Mod/Fem/Gui/TaskFemConstraintFixed.cpp index c4402e1415..e7b38bb73d 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintFixed.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintFixed.cpp @@ -153,7 +153,7 @@ void TaskFemConstraintFixed::addToSelection() else searchStr = "Face"; for (size_t iStr = 0; iStr < (SubElements.size()); ++iStr){ - if ((SubElements[iStr].find(searchStr) == std::string::npos) && (SubElements.size() > 0)){ + if (SubElements[iStr].find(searchStr) == std::string::npos){ QString msg = tr("Only one type of selection (vertex,face or edge) per constraint allowed!"); QMessageBox::warning(this, tr("Selection error"), msg); addMe = false;