From 951398ca4387f78abcefea3aba900fbd414a9dd4 Mon Sep 17 00:00:00 2001 From: Lydia Buntrock Date: Fri, 4 Dec 2020 15:18:31 +0100 Subject: [PATCH] [DOC] Refactor phred snippets. The int cast is not needed. Signed-off-by: Lydia Buntrock --- test/snippet/alphabet/quality/phred42.cpp | 5 ++--- test/snippet/alphabet/quality/phred63.cpp | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/test/snippet/alphabet/quality/phred42.cpp b/test/snippet/alphabet/quality/phred42.cpp index 3dae3d208c..f2f5258ba7 100644 --- a/test/snippet/alphabet/quality/phred42.cpp +++ b/test/snippet/alphabet/quality/phred42.cpp @@ -5,12 +5,11 @@ int main() { seqan3::phred42 phred; phred.assign_rank(2); // wrapper for assign_phred(2) - seqan3::debug_stream << (int) phred.to_phred() << "\n"; // 2 + seqan3::debug_stream << phred.to_phred() << "\n"; // 2 seqan3::debug_stream << phred.to_char() << "\n"; // '#' - seqan3::debug_stream << (int) phred.to_rank() << "\n"; // 2 + seqan3::debug_stream << phred.to_rank() << "\n"; // 2 seqan3::phred42 another_phred; another_phred.assign_phred(49); // converted down to 41 seqan3::debug_stream << another_phred.to_phred() << "\n"; // 41 - // we need to cast to(int)for human readable console output } diff --git a/test/snippet/alphabet/quality/phred63.cpp b/test/snippet/alphabet/quality/phred63.cpp index f711a8f76d..6c851d6697 100644 --- a/test/snippet/alphabet/quality/phred63.cpp +++ b/test/snippet/alphabet/quality/phred63.cpp @@ -5,13 +5,12 @@ int main() { seqan3::phred63 phred; phred.assign_rank(2); // wrapper for assign_phred(2) - seqan3::debug_stream << static_cast(phred.to_phred()) << "\n"; // 2 + seqan3::debug_stream << phred.to_phred() << "\n"; // 2 seqan3::debug_stream << phred.to_char() << "\n"; // '#' - seqan3::debug_stream << static_cast(phred.to_rank()) << "\n"; // 2 + seqan3::debug_stream << phred.to_rank() << "\n"; // 2 seqan3::phred63 another_phred{49}; seqan3::debug_stream << another_phred.to_phred() << "\n"; // 49 - // we need to cast to (int) for human readable console output seqan3::phred63 a_third_phred; another_phred.assign_phred(75); // converted down to 62