Skip to content

Commit

Permalink
Reformat syntax for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
mmore500 committed Sep 6, 2023
1 parent 9af51d2 commit 28442e3
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions avida-core/source/main/cPopulation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6711,33 +6711,27 @@ struct sTmpGenotype

inline sTmpGenotype() : id_num(-1), props(NULL) { ; }
inline bool operator<(const sTmpGenotype& rhs) const {
namespace Sys = Systematics;
const bool is_parasite = (
source.transmission_type
== Systematics::TransmissionType::HORIZONTAL
|| source.transmission_type
== Systematics::TransmissionType::VERTICAL
source.transmission_type == Sys::TransmissionType::HORIZONTAL
|| source.transmission_type == Sys::TransmissionType::VERTICAL
);
const bool rhs_is_parasite = (
rhs.source.transmission_type
== Systematics::TransmissionType::HORIZONTAL
|| rhs.source.transmission_type
== Systematics::TransmissionType::VERTICAL
rhs.source.transmission_type == Sys::TransmissionType::HORIZONTAL
|| rhs.source.transmission_type == Sys::TransmissionType::VERTICAL
);
if (is_parasite == rhs_is_parasite) return id_num > rhs.id_num;
else return !is_parasite;
}
inline bool operator>(const sTmpGenotype& rhs) const {
namespace Sys = Systematics;
const bool is_parasite = (
source.transmission_type
== Systematics::TransmissionType::HORIZONTAL
|| source.transmission_type
== Systematics::TransmissionType::VERTICAL
source.transmission_type == Sys::TransmissionType::HORIZONTAL
|| source.transmission_type == Sys::TransmissionType::VERTICAL
);
const bool rhs_is_parasite = (
rhs.source.transmission_type
== Systematics::TransmissionType::HORIZONTAL
|| rhs.source.transmission_type
== Systematics::TransmissionType::VERTICAL
rhs.source.transmission_type == Sys::TransmissionType::HORIZONTAL
|| rhs.source.transmission_type == Sys::TransmissionType::VERTICAL
);
if (is_parasite == rhs_is_parasite) return id_num < rhs.id_num;
else return is_parasite;
Expand Down

0 comments on commit 28442e3

Please sign in to comment.