Skip to content

Commit 81b0063

Browse files
minor optimization on cigar ops
1 parent 04e4cce commit 81b0063

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

cigar_utils.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ cigar_qseq_ops(InputItr itr, const InputItr last) {
6464
size_t op_count = 0;
6565
while (itr != last) {
6666
const size_t curr_val = extract_op_count(itr, last);
67-
if (consumes_query(*itr++))
68-
op_count += curr_val;
67+
op_count += curr_val*consumes_query(*itr++);
6968
}
7069
return op_count;
7170
}
@@ -82,8 +81,7 @@ cigar_rseq_ops(InputItr itr, const InputItr last) {
8281
size_t op_count = 0;
8382
while (itr != last) {
8483
const size_t curr_val = extract_op_count(itr, last);
85-
if (consumes_reference(*itr++))
86-
op_count += curr_val;
84+
op_count += curr_val*consumes_reference(*itr++);
8785
}
8886
return op_count;
8987
}

0 commit comments

Comments
 (0)