Skip to content

Commit

Permalink
fix: Cast int64_t to size_t in std::min calls to resolve type mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
ekg committed Dec 12, 2024
1 parent 8424775 commit 2575367
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/align/include/computeAlignments.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,11 +351,11 @@ void verify_cigar_alignment(const std::string& cigar,

// Calculate context range for query sequence
size_t query_context_start = (q_pos + k >= 5) ? q_pos + k - 5 : 0;
size_t query_context_end = std::min(q_pos + k + 5, static_cast<size_t>(query_length - 1));
size_t query_context_end = std::min(static_cast<size_t>(q_pos + k + 5), static_cast<size_t>(query_length - 1));

// Calculate context range for target sequence
size_t target_context_start = (t_pos + k >= 5) ? t_pos + k - 5 : 0;
size_t target_context_end = std::min(t_pos + k + 5, static_cast<size_t>(target_length - 1));
size_t target_context_end = std::min(static_cast<size_t>(t_pos + k + 5), static_cast<size_t>(target_length - 1));

// Extract context sequences
std::string query_context(query_seq + query_context_start, query_seq + query_context_end + 1);
Expand Down

0 comments on commit 2575367

Please sign in to comment.