Makes use of braces consistent within if-else sections.

This commit is contained in:
Williham Williham Totland
2020-09-25 15:10:23 +02:00
parent e8595a6076
commit 2e8e613722
2 changed files with 12 additions and 8 deletions

View File

@@ -520,9 +520,9 @@ namespace {
for (const auto& group_name : group_names) {
auto group_ptr = std::make_shared<Group>(this->getGroup(group_name, handlerContext.currentStep));
if (target_string == "NONE")
if (target_string == "NONE") {
group_ptr->set_gpmaint();
else {
} else {
GPMaint gpmaint(record);
group_ptr->set_gpmaint(std::move(gpmaint));
}
@@ -1585,8 +1585,9 @@ namespace {
new_well->updateSolventFraction(fraction);
this->updateWell(std::move(new_well), handlerContext.currentStep);
}
} else
} else {
throw std::invalid_argument("The WSOLVENT keyword can only be applied to gas injectors");
}
}
}
}

View File

@@ -317,9 +317,9 @@ namespace {
if (action_keyword.name() == "ENDACTIO")
break;
if (Action::ActionX::valid_keyword(action_keyword.name()))
if (Action::ActionX::valid_keyword(action_keyword.name())) {
action.addKeyword(action_keyword);
else {
} else {
std::string msg = "The keyword " + action_keyword.name() + " is not supported in a ACTIONX block.";
parseContext.handleError( ParseContext::ACTIONX_ILLEGAL_KEYWORD, msg, errors);
}
@@ -637,8 +637,9 @@ namespace {
preferredPhase = Phase::OIL;
OpmLog::warning("LIQ_PREFERRED_PHASE",
"LIQ preferred phase not supported for well " + wellName + ", using OIL instead");
} else
} else {
preferredPhase = get_phase(phaseStr);
}
}
const auto& refDepthItem = record.getItem("REF_DEPTH");
double refDepth = refDepthItem.hasValue( 0 )
@@ -806,10 +807,12 @@ namespace {
if (prev) {
if (!well_ptr->cmp_structure( *prev ))
wells.push_back( well_ptr->name() );
} else
} else {
wells.push_back( well_ptr->name() );
} else
}
} else {
wells.push_back( well_ptr->name() );
}
}
}