mirror of https://github.com/nothings/stb.git
fix unused variable warning
This commit is contained in:
parent
136455df6d
commit
a1a918a487
|
@ -1,4 +1,4 @@
|
|||
// stb_truetype.h - v1.10 - public domain
|
||||
// stb_truetype.h - v1.11 - public domain
|
||||
// authored from 2009-2015 by Sean Barrett / RAD Game Tools
|
||||
//
|
||||
// This library processes TrueType files:
|
||||
|
@ -51,6 +51,7 @@
|
|||
//
|
||||
// VERSION HISTORY
|
||||
//
|
||||
// 1.11 (2016-04-02) fix unused-variable warning
|
||||
// 1.10 (2016-04-02) user-defined fabs(); rare memory leak; remove duplicate typedef
|
||||
// 1.09 (2016-01-16) warning fix; avoid crash on outofmem; use allocation userdata properly
|
||||
// 1.08 (2015-09-13) document stbtt_Rasterize(); fixes for vertical & horizontal edges
|
||||
|
@ -949,6 +950,12 @@ typedef int stbtt__test_oversample_pow2[(STBTT_MAX_OVERSAMPLE & (STBTT_MAX_OVERS
|
|||
#define STBTT_RASTERIZER_VERSION 2
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define STBTT__NOTUSED(v) (void)(v)
|
||||
#else
|
||||
#define STBTT__NOTUSED(v) (void)sizeof(v)
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// accessors to parse data from file
|
||||
|
@ -2078,6 +2085,8 @@ static void stbtt__rasterize_sorted_edges(stbtt__bitmap *result, stbtt__edge *e,
|
|||
int y,j=0, i;
|
||||
float scanline_data[129], *scanline, *scanline2;
|
||||
|
||||
STBTT__NOTUSED(vsubsample);
|
||||
|
||||
if (result->w > 64)
|
||||
scanline = (float *) STBTT_malloc((result->w*2+1) * sizeof(float), userdata);
|
||||
else
|
||||
|
@ -2596,11 +2605,6 @@ STBTT_DEF void stbtt_GetBakedQuad(stbtt_bakedchar *chardata, int pw, int ph, int
|
|||
//
|
||||
|
||||
#ifndef STB_RECT_PACK_VERSION
|
||||
#ifdef _MSC_VER
|
||||
#define STBTT__NOTUSED(v) (void)(v)
|
||||
#else
|
||||
#define STBTT__NOTUSED(v) (void)sizeof(v)
|
||||
#endif
|
||||
|
||||
typedef int stbrp_coord;
|
||||
|
||||
|
@ -3215,6 +3219,7 @@ STBTT_DEF int stbtt_FindMatchingFont(const unsigned char *font_collection, const
|
|||
|
||||
// FULL VERSION HISTORY
|
||||
//
|
||||
// 1.11 (2016-04-02) fix unused-variable warning
|
||||
// 1.10 (2016-04-02) allow user-defined fabs() replacement
|
||||
// fix memory leak if fontsize=0.0
|
||||
// fix warning from duplicate typedef
|
||||
|
|
Loading…
Reference in New Issue