Re-use count variable

This commit is contained in:
Hugo 2018-09-29 19:23:42 +03:00
parent 8b34eb644f
commit 9a0b960762

View File

@ -149,7 +149,7 @@ count_used_color_buckets(const ColorCube cube) {
static void static void
avg_color_from_color_bucket(const ColorBucket bucket, Pixel *dst) { avg_color_from_color_bucket(const ColorBucket bucket, Pixel *dst) {
float count = bucket->count; float count = bucket->count;
if (bucket->count != 0) { if (count != 0) {
dst->c.r = (int)(bucket->r / count); dst->c.r = (int)(bucket->r / count);
dst->c.g = (int)(bucket->g / count); dst->c.g = (int)(bucket->g / count);
dst->c.b = (int)(bucket->b / count); dst->c.b = (int)(bucket->b / count);