From 4306eea3cb61a565669ddff32899366bbea8922c Mon Sep 17 00:00:00 2001 From: Nathan Reed Date: Sat, 30 Nov 2019 14:36:51 -0800 Subject: [PATCH] Fix VS2019 warning - VS2019 on /W4 warns about applying '*' to enums. Fixed by casting to int. --- stb_image_resize.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stb_image_resize.h b/stb_image_resize.h index 4f6ad35..9ee90b5 100644 --- a/stb_image_resize.h +++ b/stb_image_resize.h @@ -1238,7 +1238,7 @@ static float* stbir__get_decode_buffer(stbir__info* stbir_info) return &stbir_info->decode_buffer[stbir_info->horizontal_filter_pixel_margin * stbir_info->channels]; } -#define STBIR__DECODE(type, colorspace) ((type) * (STBIR_MAX_COLORSPACES) + (colorspace)) +#define STBIR__DECODE(type, colorspace) ((int)(type) * (STBIR_MAX_COLORSPACES) + (int)(colorspace)) static void stbir__decode_scanline(stbir__info* stbir_info, int n) {