Skip to content

Commit

Permalink
Merge pull request #20 from open-atmos/main-formatting
Browse files Browse the repository at this point in the history
Auto-format code changes
  • Loading branch information
K20shores authored Jan 18, 2024
2 parents 3d45292 + 1d5e0af commit 0fa9e88
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ namespace open_atmos
double coefficient = 1;
if (object.contains(validation::keys.coefficient))
{
coefficient = object[validation::keys.coefficient].get<double>();
coefficient = object[validation::keys.coefficient].get<double>();
}

auto comments = GetComments(object, validation::reaction_component.required_keys, validation::reaction_component.optional_keys);
Expand Down Expand Up @@ -318,7 +318,8 @@ namespace open_atmos
{
auto product_parse = ParseReactionComponent(product);
status = product_parse.first;
if (status != ConfigParseStatus::Success) {
if (status != ConfigParseStatus::Success)
{
break;
}
products.push_back(product_parse.second);
Expand All @@ -329,7 +330,8 @@ namespace open_atmos
{
auto reactant_parse = ParseReactionComponent(reactant);
status = reactant_parse.first;
if (status != ConfigParseStatus::Success) {
if (status != ConfigParseStatus::Success)
{
break;
}
reactants.push_back(reactant_parse.second);
Expand Down Expand Up @@ -381,14 +383,17 @@ namespace open_atmos
}

std::vector<std::string> requested_species;
for(const auto& spec : products) {
for (const auto& spec : products)
{
requested_species.push_back(spec.species_name);
}
for(const auto& spec : reactants) {
for (const auto& spec : reactants)
{
requested_species.push_back(spec.species_name);
}

if (status == ConfigParseStatus::Success && RequiresUnknownSpecies(requested_species, existing_species)) {
if (status == ConfigParseStatus::Success && RequiresUnknownSpecies(requested_species, existing_species))
{
status = ConfigParseStatus::ReactionRequiresUnknownSpecies;
}

Expand Down

0 comments on commit 0fa9e88

Please sign in to comment.