mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 10:26:19 +03:00
Re-use count variable
This commit is contained in:
parent
8b34eb644f
commit
9a0b960762
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user