Skip to content

Commit

Permalink
fix CI build problems
Browse files Browse the repository at this point in the history
  • Loading branch information
bhaller committed Sep 20, 2024
1 parent bd373a3 commit b33a104
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
5 changes: 3 additions & 2 deletions core/chromosome.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,14 @@ inline __attribute__((always_inline)) GESubrange::GESubrange(GenomicElement *p_g
#pragma mark Chromosome
#pragma mark -

Chromosome::Chromosome(Species &p_species, ChromosomeType p_type, int64_t p_id, std::string p_symbol, slim_chromosome_index_t p_index) :
Chromosome::Chromosome(Species &p_species, ChromosomeType p_type, int64_t p_id, std::string p_symbol, slim_chromosome_index_t p_index, int p_preferred_mutcount) :
id_(p_id),
symbol_(p_symbol),
name_(),
index_(p_index),
type_(p_type),

preferred_mutrun_count_(p_preferred_mutcount),

exp_neg_overall_mutation_rate_H_(0.0), exp_neg_overall_mutation_rate_M_(0.0), exp_neg_overall_mutation_rate_F_(0.0),
exp_neg_overall_recombination_rate_H_(0.0), exp_neg_overall_recombination_rate_M_(0.0), exp_neg_overall_recombination_rate_F_(0.0),

Expand Down
4 changes: 3 additions & 1 deletion core/chromosome.h
Original file line number Diff line number Diff line change
Expand Up @@ -244,13 +244,15 @@ class Chromosome : public EidosDictionaryRetained
Chromosome& operator=(const Chromosome&) = delete; // no copying
Chromosome(void) = delete; // no null constructor

explicit Chromosome(Species &p_species, ChromosomeType p_type, int64_t p_id, std::string p_symbol, slim_chromosome_index_t p_index);
explicit Chromosome(Species &p_species, ChromosomeType p_type, int64_t p_id, std::string p_symbol, slim_chromosome_index_t p_index, int p_preferred_mutcount);
~Chromosome(void);

inline __attribute__((always_inline)) int64_t ID(void) { return id_; }
inline __attribute__((always_inline)) const std::string &Symbol(void) { return symbol_; }
inline __attribute__((always_inline)) slim_chromosome_index_t Index(void) { return index_; }
inline __attribute__((always_inline)) ChromosomeType Type(void) { return type_; }
inline __attribute__((always_inline)) const std::string &Name(void) { return name_; }
inline __attribute__((always_inline)) void SetName(const std::string &p_name) { name_ = p_name; }

inline __attribute__((always_inline)) std::vector<GenomicElement *> &GenomicElements(void) { return genomic_elements_; }
inline __attribute__((always_inline)) NucleotideArray *AncestralSequence(void) { return ancestral_seq_buffer_; }
Expand Down
2 changes: 1 addition & 1 deletion core/population.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2597,7 +2597,7 @@ void Population::DoCrossoverMutation(Subpopulation *p_source_subpop, Haplosome &
{
// If we're modeling autosomes, we can disregard p_child_sex entirely; we don't care whether we're modeling sexual or hermaphrodite individuals
#if DEBUG
if (species_.has_genetics_)
if (species_.HasGenetics())
{
if (child_haplosome_null)
EIDOS_TERMINATION << "ERROR (Population::DoCrossoverMutation): A null child haplosome was requested in the autosomal case." << EidosTerminate();
Expand Down
4 changes: 2 additions & 2 deletions core/species.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ void Species::MakeImplicitChromosome(ChromosomeType p_type)
EIDOS_TERMINATION << "ERROR (Species::MakeImplicitChromosome): (internal error) explicit chromosome already exists." << EidosTerminate();

// Create an implicit Chromosome object with a retain on it from EidosDictionaryRetained::EidosDictionaryRetained()
Chromosome *chromosome = new Chromosome(*this, p_type, 1, "1", 0);
Chromosome *chromosome = new Chromosome(*this, p_type, 1, "1", /* p_index */ 0, /* p_preferred_mutcount */ 0);
int64_t id = chromosome->ID();
std::string symbol = chromosome->Symbol();

Expand Down Expand Up @@ -1875,7 +1875,7 @@ void Species::RunInitializeCallbacks(void)
has_genetics_ = false;

// Make a dummy chromosome of length zero, id 0, symbol "0"
Chromosome *dummy_chromosome = new Chromosome(*this, ChromosomeType::kA_DiploidAutosome, 0, "0", 0);
Chromosome *dummy_chromosome = new Chromosome(*this, ChromosomeType::kA_DiploidAutosome, 0, "0", /* p_index */ 0, /* p_preferred_mutcount */ 0);
int64_t id = dummy_chromosome->ID();
std::string symbol = dummy_chromosome->Symbol();

Expand Down
6 changes: 2 additions & 4 deletions core/species_eidos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,15 +296,13 @@ EidosValue_SP Species::ExecuteContextFunction_initializeChromosome(const std::st
}

// Set up the new chromosome object
Chromosome *chromosome = new Chromosome(*this, chromosome_type, id, symbol, 0);
Chromosome *chromosome = new Chromosome(*this, chromosome_type, id, symbol, /* p_index */ 0, (int)mutrun_count);
chromosome->SetName(name);

chromosomes_.push_back(chromosome);
chromosome_from_id_.emplace(id, chromosome);
chromosome_from_symbol_.emplace(symbol, chromosome);

chromosome->name_ = name;
chromosome->preferred_mutrun_count_ = (int)mutrun_count;

num_chromosome_inits_++;
has_currently_initializing_chromosome_ = true;

Expand Down

0 comments on commit b33a104

Please sign in to comment.