Skip to content

Commit

Permalink
Merge pull request #38 from jnalanko/master
Browse files Browse the repository at this point in the history
Initialize pointers (fixes issue #37)
  • Loading branch information
tmaklin authored Oct 16, 2024
2 parents 34eb9e9 + c3284e4 commit 95f9b16
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mSWEEP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ int main (int argc, char *argv[]) {
// `Sample` and its children are classes for storing data from
// the pseudoalignment that are needed or not needed depending on
// the command line arguments.
std::unique_ptr<mSWEEP::Sample> sample;
std::unique_ptr<mSWEEP::Sample> sample = std::make_unique<mSWEEP::PlainSample>();
bool bootstrap_mode = args.value<size_t>("iters") > (size_t)0;
bool bin_reads = args.value<bool>("bin-reads");

Expand Down Expand Up @@ -362,6 +362,7 @@ int main (int argc, char *argv[]) {
}

cxxio::In infile(args.value<std::string>("read-likelihood"));
log_likelihoods = std::make_unique<mSWEEP::LL_WOR21<double, int64_t>>();
log_likelihoods->from_file(reference->n_groups(i), &infile.stream());
} catch (std::exception &e) {
finalize("Reading the likelihoods failed:\n " + std::string(e.what()) + "\nexiting\n", log, true);
Expand Down

0 comments on commit 95f9b16

Please sign in to comment.