Skip to content

Commit

Permalink
fix: Improve stringstream compatibility for older GCC versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ekg committed Nov 12, 2024
1 parent 27e849b commit 2427c75
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/map/include/winSketch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,11 @@ namespace skch
<< "[wfmash::mashmap] Filtered " << filtered_kmers << "/" << total_kmers
<< " k-mers occurring > " << freq_cutoff << " times"
<< " (target: " << (param.max_kmer_freq <= 1.0 ?
(std::stringstream() << std::fixed << std::setprecision(2) << (param.max_kmer_freq * 100)).str() + "%" :
([&]() {
std::stringstream ss;
ss << std::fixed << std::setprecision(2) << (param.max_kmer_freq * 100);
return ss.str();
})() + "%" :
">" + std::to_string((int)param.max_kmer_freq) + " occurrences")
<< ")" << std::endl;
}
Expand Down

0 comments on commit 2427c75

Please sign in to comment.