From 0955c664aa7c5fc5f0bd345c58219c40f04ab9c1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 13 Feb 2011 10:52:18 +0000 Subject: fix for warnings from Sparse static source code checker, mostly BKE/BLI and python functions. - use NULL rather then 0 where possible (makes code & function calls more readable IMHO). - set static variables and functions (exposed some unused vars/funcs). - use func(void) rather then func() for definitions. --- source/blender/blenfont/intern/blf_glyph.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/blenfont/intern/blf_glyph.c') diff --git a/source/blender/blenfont/intern/blf_glyph.c b/source/blender/blenfont/intern/blf_glyph.c index c36496fb542..8d13975b83a 100644 --- a/source/blender/blenfont/intern/blf_glyph.c +++ b/source/blender/blenfont/intern/blf_glyph.c @@ -205,7 +205,7 @@ GlyphBLF *blf_glyph_search(GlyphCacheBLF *gc, unsigned int c) return(NULL); } -GlyphBLF *blf_glyph_add(FontBLF *font, FT_UInt index, unsigned int c) +GlyphBLF *blf_glyph_add(FontBLF *font, unsigned int index, unsigned int c) { FT_GlyphSlot slot; GlyphBLF *g; @@ -220,9 +220,9 @@ GlyphBLF *blf_glyph_add(FontBLF *font, FT_UInt index, unsigned int c) return(g); if (sharp) - err = FT_Load_Glyph(font->face, index, FT_LOAD_TARGET_MONO); + err = FT_Load_Glyph(font->face, (FT_UInt)index, FT_LOAD_TARGET_MONO); else - err = FT_Load_Glyph(font->face, index, FT_LOAD_TARGET_NORMAL | FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP); /* Sure about NO_* flags? */ + err = FT_Load_Glyph(font->face, (FT_UInt)index, FT_LOAD_TARGET_NORMAL | FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP); /* Sure about NO_* flags? */ if (err) return(NULL); @@ -249,7 +249,7 @@ GlyphBLF *blf_glyph_add(FontBLF *font, FT_UInt index, unsigned int c) g->next= NULL; g->prev= NULL; g->c= c; - g->idx= index; + g->idx= (FT_UInt)index; g->tex= 0; g->build_tex= 0; g->bitmap= NULL; -- cgit v1.2.3