Skip to content

Commit 2e22f1c

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

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crnlib/crn_dxt_hc.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -374,10 +374,10 @@ void dxt_hc::determine_tiles_task(uint64 data, void*) {
374374
}
375375
}
376376

377-
for (uint8 c = m_has_color_blocks ? 0 : cAlpha0; c < cAlpha0 + m_num_alpha_blocks; c++) {
378-
for (uint8 e = 0; e < 8; e++) {
377+
for (uint c = m_has_color_blocks ? 0 : cAlpha0; c < cAlpha0 + m_num_alpha_blocks; c++) {
378+
for (uint e = 0; e < 8; e++) {
379379
total_error[c][e] = 0;
380-
for (uint8 t = 0, s = e + 1; s; s >>= 1, t++)
380+
for (uint t = 0, s = e + 1; s; s >>= 1, t++)
381381
total_error[c][e] += tile_error[c][tiles[e][t]];
382382
}
383383
}

0 commit comments

Comments
 (0)