FEM: modernize C++: use range-based for loop
This commit is contained in:
@@ -511,12 +511,11 @@ void ViewProviderFemConstraint::updateRotation(const SoNode *node, const int idx
|
||||
|
||||
QObject *ViewProviderFemConstraint::findChildByName(const QObject *parent, const QString &name)
|
||||
{
|
||||
for (QObjectList::const_iterator o = parent->children().begin(); o != parent->children().end();
|
||||
o++) {
|
||||
if ((*o)->objectName() == name)
|
||||
return *o;
|
||||
if (!(*o)->children().empty()) {
|
||||
QObject *result = findChildByName(*o, name);
|
||||
for (auto o : parent->children()) {
|
||||
if (o->objectName() == name)
|
||||
return o;
|
||||
if (!o->children().empty()) {
|
||||
QObject *result = findChildByName(o, name);
|
||||
if (result)
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user