Skip to content

Commit

Permalink
Auto-format code using Clang-Format
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Jan 19, 2024
1 parent 65732fb commit e135153
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions src/parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,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 @@ -399,8 +400,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 @@ -415,7 +415,8 @@ namespace open_atmos
return { status, arrhenius };
}

std::pair<ConfigParseStatus, types::Troe> ParseTroe(const json& object, const std::vector<types::Species>& existing_species, const std::vector<types::Phase> existing_phases)
std::pair<ConfigParseStatus, types::Troe>
ParseTroe(const json& object, const std::vector<types::Species>& existing_species, const std::vector<types::Phase> existing_phases)
{
ConfigParseStatus status = ConfigParseStatus::Success;
types::Troe troe;
Expand Down Expand Up @@ -509,10 +510,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 @@ -527,7 +526,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 @@ -610,8 +610,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 @@ -627,7 +626,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 @@ -702,8 +702,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 @@ -795,7 +794,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 @@ -862,8 +862,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 e135153

Please sign in to comment.