mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-29 05:03:46 +08:00
[clang-tidy] fix small loop variable
Found with bugprone-too-small-loop-variable Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
925c7a998a
commit
8b76fe93bf
|
@ -96,7 +96,7 @@ static unsigned char convert_color(const unsigned char rgb[3], const uint32_t *c
|
||||||
long r = rgb[0], g = rgb[1], b = rgb[2];
|
long r = rgb[0], g = rgb[1], b = rgb[2];
|
||||||
unsigned long best_distance = static_cast<unsigned long>(-1);
|
unsigned long best_distance = static_cast<unsigned long>(-1);
|
||||||
unsigned char best_index = static_cast<unsigned char>(-1);
|
unsigned char best_index = static_cast<unsigned char>(-1);
|
||||||
for (unsigned char idx = 0; idx < color_count; idx++) {
|
for (size_t idx = 0; idx < color_count; idx++) {
|
||||||
uint32_t color = colors[idx];
|
uint32_t color = colors[idx];
|
||||||
long test_r = (color >> 16) & 0xFF, test_g = (color >> 8) & 0xFF,
|
long test_r = (color >> 16) & 0xFF, test_g = (color >> 8) & 0xFF,
|
||||||
test_b = (color >> 0) & 0xFF;
|
test_b = (color >> 0) & 0xFF;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user