Skip to content

Commit

Permalink
overload function
Browse files Browse the repository at this point in the history
  • Loading branch information
frederic-mahe committed Feb 14, 2025
1 parent ec2eec4 commit a0aca20
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions src/fastq_stats.cc
Original file line number Diff line number Diff line change
Expand Up @@ -93,21 +93,11 @@ auto q2p(double quality_score) -> double {
return std::pow(base, -quality_score / base);
}

// refactoring: overload, or template, or reduce types for quality values?
// auto q2p(long int quality_score) -> double {
// static constexpr auto base = 10.0;
// return std::pow(base, -quality_score / base);
// }

// auto q2p(int quality_score) -> double {
// static constexpr auto base = 10.0;
// return std::pow(base, -quality_score / base);
// }

// auto q2p(uint64_t quality_score) -> double {
// static constexpr auto base = 10.0;
// return std::pow(base, -quality_score / base);
// }
auto q2p(uint64_t quality_score) -> double {
static constexpr auto base = 10.0;
return std::pow(base, -quality_score / base);
}


auto check_quality_score(struct Parameters const & parameters, int const quality_score) -> void {
Expand Down

0 comments on commit a0aca20

Please sign in to comment.