[Bf-blender-cvs] [0e71162e689] master: Cleanup: resolve cast warnings

Campbell Barton noreply at git.blender.org
Fri Oct 29 04:14:40 CEST 2021


Commit: 0e71162e68939d90ff92e7ada3bf4fc11e0953ea
Author: Campbell Barton
Date:   Fri Oct 29 13:13:45 2021 +1100
Branches: master
https://developer.blender.org/rB0e71162e68939d90ff92e7ada3bf4fc11e0953ea

Cleanup: resolve cast warnings

===================================================================

M	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 e077cc91f33..9170a1c0ac4 100644
--- a/source/blender/blenfont/intern/blf_glyph.c
+++ b/source/blender/blenfont/intern/blf_glyph.c
@@ -293,8 +293,8 @@ GlyphBLF *blf_glyph_ensure(FontBLF *font, GlyphCacheBLF *gc, uint charcode)
   g->advance_i = (int)g->advance;
   g->pos[0] = slot->bitmap_left;
   g->pos[1] = slot->bitmap_top;
-  g->dims[0] = slot->bitmap.width;
-  g->dims[1] = slot->bitmap.rows;
+  g->dims[0] = (int)slot->bitmap.width;
+  g->dims[1] = (int)slot->bitmap.rows;
   g->pitch = slot->bitmap.pitch;
 
   FT_BBox bbox;
@@ -304,7 +304,7 @@ GlyphBLF *blf_glyph_ensure(FontBLF *font, GlyphCacheBLF *gc, uint charcode)
   g->box.ymin = ((float)bbox.yMin) / 64.0f;
   g->box.ymax = ((float)bbox.yMax) / 64.0f;
 
-  const int buffer_size = slot->bitmap.width * slot->bitmap.rows;
+  const int buffer_size = (int)(slot->bitmap.width * slot->bitmap.rows);
   if (buffer_size != 0) {
     if (font->flags & BLF_MONOCHROME) {
       /* Font buffer uses only 0 or 1 values, Blender expects full 0..255 range */



More information about the Bf-blender-cvs mailing list