From 03b2371387dcae9f801cabbc1819b1d7e3350829 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 14 Aug 2019 23:29:46 +1000 Subject: Cleanup: move trailing comments to avoid wrapping code Some statements were split across multiple lines because of their trailing comments. In most cases it's clearer to put the comments above. --- source/blender/blenfont/intern/blf_font.c | 4 ++-- source/blender/blenfont/intern/blf_glyph.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'source/blender/blenfont/intern') diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c index 7283ade3ae5..6748a5324ac 100644 --- a/source/blender/blenfont/intern/blf_font.c +++ b/source/blender/blenfont/intern/blf_font.c @@ -619,8 +619,8 @@ static void blf_font_draw_buffer_ex( cbuf[0] = (unsigned char)((b_col_char[0] * a) + (cbuf[0] * (1.0f - a))); cbuf[1] = (unsigned char)((b_col_char[1] * a) + (cbuf[1] * (1.0f - a))); cbuf[2] = (unsigned char)((b_col_char[2] * a) + (cbuf[2] * (1.0f - a))); - cbuf[3] = (unsigned char)MIN2((int)cbuf[3] + (int)(a * 255), - 255); /* clamp to 255 */ + /* clamp to 255 */ + cbuf[3] = (unsigned char)MIN2((int)cbuf[3] + (int)(a * 255), 255); } } } diff --git a/source/blender/blenfont/intern/blf_glyph.c b/source/blender/blenfont/intern/blf_glyph.c index 66be94aaa06..c0a53cbf282 100644 --- a/source/blender/blenfont/intern/blf_glyph.c +++ b/source/blender/blenfont/intern/blf_glyph.c @@ -329,10 +329,10 @@ GlyphBLF *blf_glyph_add(FontBLF *font, unsigned int index, unsigned int c) /* Convert result from 1 bit per pixel to 8 bit per pixel */ /* Accum errors for later, fine if not interested beyond "ok vs any error" */ FT_Bitmap_New(&tempbitmap); - err += FT_Bitmap_Convert(font->ft_lib, - &slot->bitmap, - &tempbitmap, - 1); /* Does Blender use Pitch 1 always? It works so far */ + + /* Does Blender use Pitch 1 always? It works so far */ + err += FT_Bitmap_Convert(font->ft_lib, &slot->bitmap, &tempbitmap, 1); + err += FT_Bitmap_Copy(font->ft_lib, &tempbitmap, &slot->bitmap); err += FT_Bitmap_Done(font->ft_lib, &tempbitmap); } -- cgit v1.2.3