FEM: Add curly brackets to one line for/if or if/if commands

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
This commit is contained in:
Przemo Firszt 2015-05-26 21:43:58 +01:00
parent 70318d7820
commit aed303f4ff
2 changed files with 16 additions and 8 deletions

View File

@ -144,13 +144,17 @@ void TaskFemConstraintFixed::onSelectionChanged(const Gui::SelectionChanges& msg
// Avoid duplicates
std::size_t pos = 0;
for (; pos < Objects.size(); pos++)
if (obj == Objects[pos])
for (; pos < Objects.size(); pos++) {
if (obj == Objects[pos]) {
break;
}
}
if (pos != Objects.size())
if (subName == SubElements[pos])
if (pos != Objects.size()) {
if (subName == SubElements[pos]) {
return;
}
}
// add the new reference
Objects.push_back(obj);

View File

@ -184,13 +184,17 @@ void TaskFemConstraintForce::onSelectionChanged(const Gui::SelectionChanges& msg
// Avoid duplicates
std::size_t pos = 0;
for (; pos < Objects.size(); pos++)
if (obj == Objects[pos])
for (; pos < Objects.size(); pos++) {
if (obj == Objects[pos]) {
break;
}
}
if (pos != Objects.size())
if (subName == SubElements[pos])
if (pos != Objects.size()) {
if (subName == SubElements[pos]) {
return;
}
}
// add the new reference
Objects.push_back(obj);