From 31ead1954f84a0491b5fd1aa3743bcc4fcc11715 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Thu, 11 Jul 2024 01:02:09 +0200 Subject: [PATCH] crnlib: fix CodeQL report cpp/comparison-with-wider-type --- crnlib/crn_dxt_hc.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crnlib/crn_dxt_hc.cpp b/crnlib/crn_dxt_hc.cpp index 18c9c39c..4e621f2b 100644 --- a/crnlib/crn_dxt_hc.cpp +++ b/crnlib/crn_dxt_hc.cpp @@ -374,10 +374,10 @@ void dxt_hc::determine_tiles_task(uint64 data, void*) { } } - for (uint8 c = m_has_color_blocks ? 0 : cAlpha0; c < cAlpha0 + m_num_alpha_blocks; c++) { - for (uint8 e = 0; e < 8; e++) { + for (uint c = m_has_color_blocks ? 0 : cAlpha0; c < cAlpha0 + m_num_alpha_blocks; c++) { + for (uint e = 0; e < 8; e++) { total_error[c][e] = 0; - for (uint8 t = 0, s = e + 1; s; s >>= 1, t++) + for (uint t = 0, s = e + 1; s; s >>= 1, t++) total_error[c][e] += tile_error[c][tiles[e][t]]; } }