Fix some MSVC /W4 warnings
This commit is contained in:
parent
a99bc0ca32
commit
1adb98f142
@ -552,9 +552,9 @@ typedef struct
|
|||||||
} stbir__info;
|
} stbir__info;
|
||||||
|
|
||||||
|
|
||||||
static const double stbir__max_uint8_as_float = 255.0f;
|
static const float stbir__max_uint8_as_float = 255.0f;
|
||||||
static const double stbir__max_uint16_as_float = 65535.0f;
|
static const float stbir__max_uint16_as_float = 65535.0f;
|
||||||
static const double stbir__max_uint32_as_float = 4294967295.0f;
|
static const double stbir__max_uint32_as_float = 4294967295.0;
|
||||||
|
|
||||||
|
|
||||||
static stbir__inline int stbir__min(int a, int b)
|
static stbir__inline int stbir__min(int a, int b)
|
||||||
@ -1714,8 +1714,12 @@ static void stbir__encode_scanline(stbir__info* stbir_info, int num_pixels, void
|
|||||||
// build a table of all channels that need colorspace correction, so
|
// build a table of all channels that need colorspace correction, so
|
||||||
// we don't perform colorspace correction on channels that don't need it.
|
// we don't perform colorspace correction on channels that don't need it.
|
||||||
for (x = 0, num_nonalpha = 0; x < channels; ++x)
|
for (x = 0, num_nonalpha = 0; x < channels; ++x)
|
||||||
|
{
|
||||||
if (x != alpha_channel || (stbir_info->flags & STBIR_FLAG_ALPHA_USES_COLORSPACE))
|
if (x != alpha_channel || (stbir_info->flags & STBIR_FLAG_ALPHA_USES_COLORSPACE))
|
||||||
nonalpha[num_nonalpha++] = x;
|
{
|
||||||
|
nonalpha[num_nonalpha++] = (stbir_uint16)x;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#define STBIR__ROUND_INT(f) ((int) ((f)+0.5))
|
#define STBIR__ROUND_INT(f) ((int) ((f)+0.5))
|
||||||
#define STBIR__ROUND_UINT(f) ((stbir_uint32) ((f)+0.5))
|
#define STBIR__ROUND_UINT(f) ((stbir_uint32) ((f)+0.5))
|
||||||
|
Loading…
Reference in New Issue
Block a user