From 42556fec82f03f9061dc574e7ab542c28d22486e Mon Sep 17 00:00:00 2001 From: Sean Barrett Date: Mon, 11 Aug 2014 02:26:17 -0700 Subject: [PATCH] don't require manual synchronization of STBR_MAX_COLORSPACES/MAX_TYPES --- stb_resample.h | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/stb_resample.h b/stb_resample.h index 649fbe4..8a3fc28 100644 --- a/stb_resample.h +++ b/stb_resample.h @@ -89,23 +89,21 @@ typedef enum typedef enum { - STBR_COLORSPACE_LINEAR = 1, - STBR_COLORSPACE_SRGB = 2, - // If you add here, update STBR_MAX_COLORSPACES -} stbr_colorspace; + STBR_COLORSPACE_LINEAR, + STBR_COLORSPACE_SRGB, -#define STBR_MAX_COLORSPACES 2 + STBR_MAX_COLORSPACES, +} stbr_colorspace; typedef enum { - STBR_TYPE_UINT8 = 1, - STBR_TYPE_UINT16 = 2, - STBR_TYPE_UINT32 = 3, - STBR_TYPE_FLOAT = 4, - // If you add here, update STBR_MAX_TYPES and stbr__type_size -} stbr_type; + STBR_TYPE_UINT8 , + STBR_TYPE_UINT16, + STBR_TYPE_UINT32, + STBR_TYPE_FLOAT , -#define STBR_MAX_TYPES 4 + STBR_MAX_TYPES +} stbr_type; typedef unsigned char stbr_uint8;