Merge "EstimateBestFilter: use an int to iterate WEBP_FILTER_TYPE"

This commit is contained in:
pascal massimino 2013-12-03 23:32:41 -08:00 committed by Gerrit Code Review
commit 8189885b6d

View File

@ -228,7 +228,8 @@ WEBP_FILTER_TYPE EstimateBestFilter(const uint8_t* data,
} }
} }
{ {
WEBP_FILTER_TYPE filter, best_filter = WEBP_FILTER_NONE; int filter;
WEBP_FILTER_TYPE best_filter = WEBP_FILTER_NONE;
int best_score = 0x7fffffff; int best_score = 0x7fffffff;
for (filter = WEBP_FILTER_NONE; filter < WEBP_FILTER_LAST; ++filter) { for (filter = WEBP_FILTER_NONE; filter < WEBP_FILTER_LAST; ++filter) {
int score = 0; int score = 0;
@ -239,7 +240,7 @@ WEBP_FILTER_TYPE EstimateBestFilter(const uint8_t* data,
} }
if (score < best_score) { if (score < best_score) {
best_score = score; best_score = score;
best_filter = filter; best_filter = (WEBP_FILTER_TYPE)filter;
} }
} }
return best_filter; return best_filter;