Skip to content

Commit

Permalink
Break long conditional across lines
Browse files Browse the repository at this point in the history
  • Loading branch information
mmore500 committed Nov 15, 2023
1 parent 436b347 commit 8a4bfc7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion avida-core/source/main/cPopulation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,12 @@ bool cPopulation::ActivateParasite(cOrganism* host, Systematics::UnitPtr parent,
// @TODO - activate parasite target selection should account for hardware type
cOrganism* target_organism = NULL;
// If there's any migration turned on ... try this first
if(m_world->GetConfig().NUM_DEMES.Get() > 0 && m_world->GetConfig().DEMES_PARASITE_MIGRATION_RATE.Get() > 0.0 && m_world->GetConfig().DEMES_MIGRATION_METHOD.Get() == 4 && m_world->GetRandom().P(m_world->GetConfig().DEMES_PARASITE_MIGRATION_RATE.Get())){
if(
m_world->GetConfig().NUM_DEMES.Get() > 0
&& m_world->GetConfig().DEMES_PARASITE_MIGRATION_RATE.Get() > 0.0
&& m_world->GetConfig().DEMES_MIGRATION_METHOD.Get() == 4
&& m_world->GetRandom().P(m_world->GetConfig().DEMES_PARASITE_MIGRATION_RATE.Get())
){
cDeme& deme = GetDeme(m_world->GetMigrationMatrix().GetProbabilisticDemeID(host_cell.GetDemeID(), m_world->GetRandom(),true));

// Implementation #1 - Picks randomly of ALL cells in to-deme and then finds if the one it chose was occupied
Expand Down

0 comments on commit 8a4bfc7

Please sign in to comment.