From 6db31dbd6aa4a3d80da877bfb083d9f265374b95 Mon Sep 17 00:00:00 2001 From: Ben Haller Date: Thu, 28 Sep 2023 14:07:06 -0400 Subject: [PATCH] fix private member access issue for some builds --- core/population.cpp | 18 +++++++++--------- core/subpopulation.cpp | 8 ++++---- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/core/population.cpp b/core/population.cpp index a9c698eb..a2968e10 100644 --- a/core/population.cpp +++ b/core/population.cpp @@ -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); @@ -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); @@ -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); @@ -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); @@ -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); @@ -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); @@ -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); @@ -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); @@ -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); diff --git a/core/subpopulation.cpp b/core/subpopulation.cpp index c0c0091f..ecaa13de 100644 --- a/core/subpopulation.cpp +++ b/core/subpopulation.cpp @@ -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) { @@ -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) { @@ -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) @@ -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) {