Skip to content

Commit

Permalink
merging
Browse files Browse the repository at this point in the history
  • Loading branch information
K20shores committed Jan 19, 2024
2 parents 45b7498 + 51a289a commit 860d539
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions src/parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,8 @@ namespace open_atmos
return { status, component };
}

std::pair<ConfigParseStatus, types::Arrhenius> ParseArrhenius(const json& object, const std::vector<types::Species>& existing_species, const std::vector<types::Phase> existing_phases)
std::pair<ConfigParseStatus, types::Arrhenius>
ParseArrhenius(const json& object, const std::vector<types::Species>& existing_species, const std::vector<types::Phase> existing_phases)
{
ConfigParseStatus status = ConfigParseStatus::Success;
types::Arrhenius arrhenius;
Expand Down Expand Up @@ -416,8 +417,7 @@ namespace open_atmos
}

std::string gas_phase = object[validation::keys.gas_phase].get<std::string>();
auto it =
std::find_if(existing_phases.begin(), existing_phases.end(), [&gas_phase](const auto& phase) { return phase.name == gas_phase; });
auto it = std::find_if(existing_phases.begin(), existing_phases.end(), [&gas_phase](const auto& phase) { return phase.name == gas_phase; });
if (status == ConfigParseStatus::Success && it == existing_phases.end())
{
status = ConfigParseStatus::UnknownPhase;
Expand Down Expand Up @@ -648,10 +648,8 @@ namespace open_atmos
status = ConfigParseStatus::ReactionRequiresUnknownSpecies;
}


std::string gas_phase = object[validation::keys.gas_phase].get<std::string>();
auto it =
std::find_if(existing_phases.begin(), existing_phases.end(), [&gas_phase](const auto& phase) { return phase.name == gas_phase; });
auto it = std::find_if(existing_phases.begin(), existing_phases.end(), [&gas_phase](const auto& phase) { return phase.name == gas_phase; });
if (status == ConfigParseStatus::Success && it == existing_phases.end())
{
status = ConfigParseStatus::UnknownPhase;
Expand All @@ -666,7 +664,8 @@ namespace open_atmos
return { status, troe };
}

std::pair<ConfigParseStatus, types::Branched> ParseBranched(const json& object, const std::vector<types::Species>& existing_species, const std::vector<types::Phase> existing_phases)
std::pair<ConfigParseStatus, types::Branched>
ParseBranched(const json& object, const std::vector<types::Species>& existing_species, const std::vector<types::Phase> existing_phases)
{
ConfigParseStatus status = ConfigParseStatus::Success;
types::Branched branched;
Expand Down Expand Up @@ -749,8 +748,7 @@ namespace open_atmos
}

std::string gas_phase = object[validation::keys.gas_phase].get<std::string>();
auto it =
std::find_if(existing_phases.begin(), existing_phases.end(), [&gas_phase](const auto& phase) { return phase.name == gas_phase; });
auto it = std::find_if(existing_phases.begin(), existing_phases.end(), [&gas_phase](const auto& phase) { return phase.name == gas_phase; });
if (status == ConfigParseStatus::Success && it == existing_phases.end())
{
status = ConfigParseStatus::UnknownPhase;
Expand All @@ -766,7 +764,8 @@ namespace open_atmos
return { status, branched };
}

std::pair<ConfigParseStatus, types::Tunneling> ParseTunneling(const json& object, const std::vector<types::Species>& existing_species, const std::vector<types::Phase> existing_phases)
std::pair<ConfigParseStatus, types::Tunneling>
ParseTunneling(const json& object, const std::vector<types::Species>& existing_species, const std::vector<types::Phase> existing_phases)
{
ConfigParseStatus status = ConfigParseStatus::Success;
types::Tunneling tunneling;
Expand Down Expand Up @@ -841,8 +840,7 @@ namespace open_atmos
}

std::string gas_phase = object[validation::keys.gas_phase].get<std::string>();
auto it =
std::find_if(existing_phases.begin(), existing_phases.end(), [&gas_phase](const auto& phase) { return phase.name == gas_phase; });
auto it = std::find_if(existing_phases.begin(), existing_phases.end(), [&gas_phase](const auto& phase) { return phase.name == gas_phase; });
if (status == ConfigParseStatus::Success && it == existing_phases.end())
{
status = ConfigParseStatus::UnknownPhase;
Expand Down Expand Up @@ -934,7 +932,8 @@ namespace open_atmos
return { status, surface };
}

std::pair<ConfigParseStatus, types::Photolysis> ParsePhotolysis(const json& object, const std::vector<types::Species> existing_species, const std::vector<types::Phase> existing_phases)
std::pair<ConfigParseStatus, types::Photolysis>
ParsePhotolysis(const json& object, const std::vector<types::Species> existing_species, const std::vector<types::Phase> existing_phases)
{
ConfigParseStatus status = ConfigParseStatus::Success;
types::Photolysis photolysis;
Expand Down Expand Up @@ -1001,8 +1000,7 @@ namespace open_atmos
}

std::string gas_phase = object[validation::keys.gas_phase].get<std::string>();
auto it =
std::find_if(existing_phases.begin(), existing_phases.end(), [&gas_phase](const auto& phase) { return phase.name == gas_phase; });
auto it = std::find_if(existing_phases.begin(), existing_phases.end(), [&gas_phase](const auto& phase) { return phase.name == gas_phase; });
if (status == ConfigParseStatus::Success && it == existing_phases.end())
{
status = ConfigParseStatus::UnknownPhase;
Expand Down

0 comments on commit 860d539

Please sign in to comment.