mirror of
				https://github.com/webmproject/libwebp.git
				synced 2025-10-31 18:35:41 +01:00 
			
		
		
		
	EstimateBestFilter: use an int to iterate WEBP_FILTER_TYPE
this change allows the code to be built with a C++ compiler without the addition of an operator++ Change-Id: I2f2fae720b9772abfc3c540bb2e3bf9107d96cc9
This commit is contained in:
		| @@ -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; | ||||
|     for (filter = WEBP_FILTER_NONE; filter < WEBP_FILTER_LAST; ++filter) { | ||||
|       int score = 0; | ||||
| @@ -239,7 +240,7 @@ WEBP_FILTER_TYPE EstimateBestFilter(const uint8_t* data, | ||||
|       } | ||||
|       if (score < best_score) { | ||||
|         best_score = score; | ||||
|         best_filter = filter; | ||||
|         best_filter = (WEBP_FILTER_TYPE)filter; | ||||
|       } | ||||
|     } | ||||
|     return best_filter; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user