Skip to content

Commit

Permalink
fix private member access issue for some builds
Browse files Browse the repository at this point in the history
  • Loading branch information
bhaller committed Sep 28, 2023
1 parent d19086c commit 6db31db
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
18 changes: 9 additions & 9 deletions core/population.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1468,7 +1468,7 @@ void Population::EvolveSubpopulation(Subpopulation &p_subpop, bool p_mate_choice
}

// BCH 9/26/2023: inherit the spatial position of the first parent by default, to set up for pointDeviated()
new_child->InheritSpatialPosition(species_.spatial_dimensionality_, source_subpop.parent_individuals_[parent1]);
new_child->InheritSpatialPosition(species_.SpatialDimensionality(), source_subpop.parent_individuals_[parent1]);

DoClonalMutation(&source_subpop, child_genome_1, parent_genome_1, child_sex, mutation_callbacks);
DoClonalMutation(&source_subpop, child_genome_2, parent_genome_2, child_sex, mutation_callbacks);
Expand Down Expand Up @@ -1541,7 +1541,7 @@ void Population::EvolveSubpopulation(Subpopulation &p_subpop, bool p_mate_choice
species_.SetCurrentNewIndividual(new_child);

// BCH 9/26/2023: inherit the spatial position of the first parent by default, to set up for pointDeviated()
new_child->InheritSpatialPosition(species_.spatial_dimensionality_, source_subpop.parent_individuals_[parent1]);
new_child->InheritSpatialPosition(species_.SpatialDimensionality(), source_subpop.parent_individuals_[parent1]);

// recombination, gene-conversion, mutation
DoCrossoverMutation(&source_subpop, *p_subpop.child_genomes_[2 * child_index], parent1, child_sex, parent1_sex, recombination_callbacks, mutation_callbacks);
Expand Down Expand Up @@ -1631,7 +1631,7 @@ void Population::EvolveSubpopulation(Subpopulation &p_subpop, bool p_mate_choice
species_.SetCurrentNewIndividual(new_child);

// BCH 9/26/2023: inherit the spatial position of the first parent by default, to set up for pointDeviated()
new_child->InheritSpatialPosition(species_.spatial_dimensionality_, source_subpop.parent_individuals_[parent1]);
new_child->InheritSpatialPosition(species_.SpatialDimensionality(), source_subpop.parent_individuals_[parent1]);

// recombination, gene-conversion, mutation
DoCrossoverMutation(&source_subpop, *p_subpop.child_genomes_[2 * child_count], parent1, IndividualSex::kHermaphrodite, IndividualSex::kHermaphrodite, recombination_callbacks, mutation_callbacks);
Expand Down Expand Up @@ -1926,7 +1926,7 @@ void Population::EvolveSubpopulation(Subpopulation &p_subpop, bool p_mate_choice
}

// BCH 9/26/2023: inherit the spatial position of the first parent by default, to set up for pointDeviated()
new_child->InheritSpatialPosition(species_.spatial_dimensionality_, source_subpop->parent_individuals_[parent1]);
new_child->InheritSpatialPosition(species_.SpatialDimensionality(), source_subpop->parent_individuals_[parent1]);

DoClonalMutation(source_subpop, child_genome_1, parent_genome_1, child_sex, mutation_callbacks);
DoClonalMutation(source_subpop, child_genome_2, parent_genome_2, child_sex, mutation_callbacks);
Expand Down Expand Up @@ -1999,7 +1999,7 @@ void Population::EvolveSubpopulation(Subpopulation &p_subpop, bool p_mate_choice
species_.SetCurrentNewIndividual(new_child);

// BCH 9/26/2023: inherit the spatial position of the first parent by default, to set up for pointDeviated()
new_child->InheritSpatialPosition(species_.spatial_dimensionality_, source_subpop->parent_individuals_[parent1]);
new_child->InheritSpatialPosition(species_.SpatialDimensionality(), source_subpop->parent_individuals_[parent1]);

// recombination, gene-conversion, mutation
DoCrossoverMutation(source_subpop, *p_subpop.child_genomes_[2 * child_index], parent1, child_sex, parent1_sex, recombination_callbacks, mutation_callbacks);
Expand Down Expand Up @@ -2199,7 +2199,7 @@ void Population::EvolveSubpopulation(Subpopulation &p_subpop, bool p_mate_choice
// species_.SetCurrentNewIndividual(new_child); // this is disabled because it is not thread-safe, and we have no callbacks so we will not retract this child

// BCH 9/26/2023: inherit the spatial position of the first parent by default, to set up for pointDeviated()
new_child->InheritSpatialPosition(species_.spatial_dimensionality_, source_subpop.parent_individuals_[parent1]);
new_child->InheritSpatialPosition(species_.SpatialDimensionality(), source_subpop.parent_individuals_[parent1]);

// recombination, gene-conversion, mutation
DoCrossoverMutation(&source_subpop, *p_subpop.child_genomes_[2 * this_child_index], parent1, child_sex, IndividualSex::kFemale, nullptr, nullptr);
Expand Down Expand Up @@ -2240,7 +2240,7 @@ void Population::EvolveSubpopulation(Subpopulation &p_subpop, bool p_mate_choice
// species_.SetCurrentNewIndividual(new_child); // this is disabled because it is not thread-safe, and we have no callbacks so we will not retract this child

// BCH 9/26/2023: inherit the spatial position of the first parent by default, to set up for pointDeviated()
new_child->InheritSpatialPosition(species_.spatial_dimensionality_, source_subpop.parent_individuals_[parent1]);
new_child->InheritSpatialPosition(species_.SpatialDimensionality(), source_subpop.parent_individuals_[parent1]);

// recombination, gene-conversion, mutation
DoCrossoverMutation(&source_subpop, *p_subpop.child_genomes_[2 * this_child_index], parent1, child_sex, IndividualSex::kHermaphrodite, nullptr, nullptr);
Expand Down Expand Up @@ -2300,7 +2300,7 @@ void Population::EvolveSubpopulation(Subpopulation &p_subpop, bool p_mate_choice
}

// BCH 9/26/2023: inherit the spatial position of the first parent by default, to set up for pointDeviated()
new_child->InheritSpatialPosition(species_.spatial_dimensionality_, source_subpop.parent_individuals_[parent1]);
new_child->InheritSpatialPosition(species_.SpatialDimensionality(), source_subpop.parent_individuals_[parent1]);

DoClonalMutation(&source_subpop, child_genome_1, parent_genome_1, child_sex, nullptr);
DoClonalMutation(&source_subpop, child_genome_2, parent_genome_2, child_sex, nullptr);
Expand Down Expand Up @@ -2357,7 +2357,7 @@ void Population::EvolveSubpopulation(Subpopulation &p_subpop, bool p_mate_choice
// species_.SetCurrentNewIndividual(new_child); // this is disabled because it is not thread-safe, and we have no callbacks so we will not retract this child

// BCH 9/26/2023: inherit the spatial position of the first parent by default, to set up for pointDeviated()
new_child->InheritSpatialPosition(species_.spatial_dimensionality_, source_subpop.parent_individuals_[parent1]);
new_child->InheritSpatialPosition(species_.SpatialDimensionality(), source_subpop.parent_individuals_[parent1]);

// recombination, gene-conversion, mutation
DoCrossoverMutation(&source_subpop, *p_subpop.child_genomes_[2 * this_child_index], parent1, child_sex, parent1_sex, nullptr, nullptr);
Expand Down
8 changes: 4 additions & 4 deletions core/subpopulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4519,7 +4519,7 @@ EidosValue_SP Subpopulation::ExecuteMethod_addCloned(EidosGlobalStringID p_metho
}

// BCH 9/26/2023: inherit the spatial position of the first parent by default, to set up for pointDeviated()
individual->InheritSpatialPosition(species_.spatial_dimensionality_, parent);
individual->InheritSpatialPosition(species_.SpatialDimensionality(), parent);

if (defer)
{
Expand Down Expand Up @@ -4681,7 +4681,7 @@ EidosValue_SP Subpopulation::ExecuteMethod_addCrossed(EidosGlobalStringID p_meth
species_.SetCurrentNewIndividual(individual);

// BCH 9/26/2023: inherit the spatial position of the first parent by default, to set up for pointDeviated()
individual->InheritSpatialPosition(species_.spatial_dimensionality_, parent1);
individual->InheritSpatialPosition(species_.SpatialDimensionality(), parent1);

if (defer)
{
Expand Down Expand Up @@ -5202,7 +5202,7 @@ EidosValue_SP Subpopulation::ExecuteMethod_addRecombinant(EidosGlobalStringID p_
// Note that, unlike other addX() methods, the first parent is not necessarily defined; in that case, the
// spatial position of the offspring is left uninitialized.
if (pedigree_parent1)
individual->InheritSpatialPosition(species_.spatial_dimensionality_, pedigree_parent1);
individual->InheritSpatialPosition(species_.SpatialDimensionality(), pedigree_parent1);

// Construct the first child genome, depending upon whether recombination is requested, etc.
if (strand1)
Expand Down Expand Up @@ -5528,7 +5528,7 @@ EidosValue_SP Subpopulation::ExecuteMethod_addSelfed(EidosGlobalStringID p_metho
species_.SetCurrentNewIndividual(individual);

// BCH 9/26/2023: inherit the spatial position of the first parent by default, to set up for pointDeviated()
individual->InheritSpatialPosition(species_.spatial_dimensionality_, parent);
individual->InheritSpatialPosition(species_.SpatialDimensionality(), parent);

if (defer)
{
Expand Down

0 comments on commit 6db31db

Please sign in to comment.