cleanup: Flatten nested if blocks with continue statements

Easier to read
This commit is contained in:
John Colvin committed 2025-01-03 16:59:07 +00:00
1 parent 350144ffd5
commit 71fc43af68
1 file changed
+13 -12
+13 -12
View File
@@ -503,18 +503,19 @@ class SyntheticConsumerInst {
if (iter != real_handles.end()) {
// real handle
legs.push_back(iter->second);
} else {
auto iter2 = existing.find(leg_key);
if (iter2 != existing.end()) {
// existing synthetic handle
legs.push_back(MDConsumerHandle(iter2->second));
} else {
auto iter3 = result.find(leg_key);
if (iter3 != result.end()) {
// new synthetic handle?
legs.push_back(MDConsumerHandle(iter3->second));
}
}
continue;
}
auto iter2 = existing.find(leg_key);
if (iter2 != existing.end()) {
// existing synthetic handle
legs.push_back(MDConsumerHandle(iter2->second));
continue;
}
auto iter3 = result.find(leg_key);
if (iter3 != result.end()) {
// new synthetic handle?
legs.push_back(MDConsumerHandle(iter3->second));
continue;
}
}
// If we found all the legs