Commit a916080d authored by Mikaël Salson's avatar Mikaël Salson Committed by Mathieu Giraud
Browse files

representative.cpp: satisfy clang

Clang doesn't allow the declaration of a variable-length array
with a non-POD type. Thus we do it the classical way.
parent 01e7f4b4
......@@ -169,7 +169,7 @@ void KmerRepresentativeComputer::compute(bool try_hard) {
memset(&cover[pos_required], true, required.length()*sizeof(bool));
length_cover = required.length();
vector<Kmer> counts[nb_seeds];
vector<Kmer> *counts = new vector<Kmer>[nb_seeds];
for (size_t i = 0; i < nb_seeds; i++)
counts[i] = index[i]->getResults(sequence.sequence, false, seeds[i]);
......@@ -212,10 +212,12 @@ void KmerRepresentativeComputer::compute(bool try_hard) {
}
// We have a requirement (ie. a non empty string). We reached it, exit.
length_run = 0;
delete [] counts;
}
coverage = (float) length_longest_run / coverage_reference_length;
if (coverage < THRESHOLD_BAD_COVERAGE && ! try_hard) {
compute(true);
delete index[0];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment