From 72ef9dcbadd37562cfe75f5ca3e0346954f129f1 Mon Sep 17 00:00:00 2001 From: Sean Barrett Date: Mon, 29 Jan 2018 03:27:58 -0800 Subject: [PATCH] fix fall-through case warning, add credit --- stb_image.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/stb_image.h b/stb_image.h index 6dae0e1..e0cf014 100644 --- a/stb_image.h +++ b/stb_image.h @@ -97,7 +97,8 @@ RECENT REVISION HISTORY: Michaelangel007@github Philipp Wiesemann Dale Weiler github:sammyhw Oriol Ferrer Mesia Josh Tobin Matthew Gregan github:phprus Blazej Dariusz Roszkowski Gregory Mullen github:poppolopoppo - Christian Floisand Kevin Schmidt Baldur Karlsson darealshinji + Christian Floisand Kevin Schmidt Baldur Karlsson github:darealshinji + Aldo Culquicondor */ #ifndef STBI_INCLUDE_STB_IMAGE_H @@ -5264,13 +5265,13 @@ static void *stbi__bmp_load(stbi__context *s, int *x, int *y, int *comp, int req static int stbi__tga_get_comp(int bits_per_pixel, int is_grey, int* is_rgb16) { // only RGB or RGBA (incl. 16bit) or grey allowed - if(is_rgb16) *is_rgb16 = 0; + if (is_rgb16) *is_rgb16 = 0; switch(bits_per_pixel) { case 8: return STBI_grey; case 16: if(is_grey) return STBI_grey_alpha; - // else: fall-through + // fall-through case 15: if(is_rgb16) *is_rgb16 = 1; - return STBI_rgb; + return STBI_rgb; case 24: // fall-through case 32: return bits_per_pixel/8; default: return 0;