Fixing clang compiler warnings.
This commit is contained in:
parent
c80af94c07
commit
1efdf2a1de
@ -202,7 +202,7 @@ int fons__tt_buildGlyphBitmap(FONSttFontImpl *font, int glyph, float size, float
|
||||
ftError = FT_Get_Advance(font->font, glyph, FT_LOAD_NO_SCALE, (FT_Fixed*)advance);
|
||||
if (ftError) return 0;
|
||||
ftGlyph = font->font->glyph;
|
||||
*lsb = ftGlyph->metrics.horiBearingX;
|
||||
*lsb = (int)ftGlyph->metrics.horiBearingX;
|
||||
*x0 = ftGlyph->bitmap_left;
|
||||
*x1 = *x0 + ftGlyph->bitmap.width;
|
||||
*y0 = -ftGlyph->bitmap_top;
|
||||
@ -233,7 +233,7 @@ int fons__tt_getGlyphKernAdvance(FONSttFontImpl *font, int glyph1, int glyph2)
|
||||
{
|
||||
FT_Vector ftKerning;
|
||||
FT_Get_Kerning(font->font, glyph1, glyph2, FT_KERNING_DEFAULT, &ftKerning);
|
||||
return ftKerning.x;
|
||||
return (int)ftKerning.x;
|
||||
}
|
||||
|
||||
#else
|
||||
@ -421,6 +421,8 @@ struct FONScontext
|
||||
void* errorUptr;
|
||||
};
|
||||
|
||||
#ifdef STB_TRUETYPE_IMPLEMENTATION
|
||||
|
||||
static void* fons__tmpalloc(size_t size, void* up)
|
||||
{
|
||||
unsigned char* ptr;
|
||||
@ -446,6 +448,8 @@ static void fons__tmpfree(void* ptr, void* up)
|
||||
// empty
|
||||
}
|
||||
|
||||
#endif // STB_TRUETYPE_IMPLEMENTATION
|
||||
|
||||
// Copyright (c) 2008-2010 Bjoern Hoehrmann <bjoern@hoehrmann.de>
|
||||
// See http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ for details.
|
||||
|
||||
|
@ -386,7 +386,7 @@ NVGcolor nvgLerpRGBA(NVGcolor c0, NVGcolor c1, float u)
|
||||
{
|
||||
int i;
|
||||
float oneminu;
|
||||
NVGcolor cint;
|
||||
NVGcolor cint = {0};
|
||||
|
||||
u = nvg__clampf(u, 0.0f, 1.0f);
|
||||
oneminu = 1.0f - u;
|
||||
|
Loading…
x
Reference in New Issue
Block a user