Skip to content

Commit c3284e4

Browse files
committed
Initialize pointers (fixes issue #37)
1 parent 34eb9e9 commit c3284e4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/mSWEEP.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ int main (int argc, char *argv[]) {
285285
// `Sample` and its children are classes for storing data from
286286
// the pseudoalignment that are needed or not needed depending on
287287
// the command line arguments.
288-
std::unique_ptr<mSWEEP::Sample> sample;
288+
std::unique_ptr<mSWEEP::Sample> sample = std::make_unique<mSWEEP::PlainSample>();
289289
bool bootstrap_mode = args.value<size_t>("iters") > (size_t)0;
290290
bool bin_reads = args.value<bool>("bin-reads");
291291

@@ -362,6 +362,7 @@ int main (int argc, char *argv[]) {
362362
}
363363

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

0 commit comments

Comments
 (0)