Skip to content

Commit 6ec30ec

Browse files
committed
crnlib: fix CodeQL report cpp/comparison-with-wider-type
1 parent 2df5839 commit 6ec30ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crnlib/crn_comp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@ static void remap_alpha_endpoints(uint16* remapping, const optimize_alpha_params
883883
const optimize_alpha_params::unpacked_endpoint& e_back = unpacked_endpoints[chosen.back()];
884884
uint16 selected_index = 0;
885885
uint64 best_value = 0, selected_similarity_front = 0, selected_similarity_back = 0;
886-
for (uint16 i = 0; i < remaining.size(); i++) {
886+
for (size_t i = 0; i < remaining.size(); i++) {
887887
uint remaining_index = remaining[i];
888888
const optimize_alpha_params::unpacked_endpoint& e_remaining = unpacked_endpoints[remaining_index];
889889
uint error_front = math::square(e_remaining.low - e_front.low) + math::square(e_remaining.high - e_front.high);
@@ -912,7 +912,7 @@ static void remap_alpha_endpoints(uint16* remapping, const optimize_alpha_params
912912
chosen.push_back(selected);
913913
}
914914
remaining.erase(remaining.begin() + selected_index);
915-
for (uint16 i = 0; i < remaining.size(); i++)
915+
for (size_t i = 0; i < remaining.size(); i++)
916916
total_frequency[remaining[i]] += frequency[remaining[i]];
917917
}
918918
for (uint16 i = 0; i < n; i++)

0 commit comments

Comments
 (0)