[Bf-blender-cvs] [d98791a106f] master: Cleanup: clang tidy

Jacques Lucke noreply at git.blender.org
Fri Aug 6 10:20:32 CEST 2021


Commit: d98791a106ffd1546ec476f3f38caeedd6f99047
Author: Jacques Lucke
Date:   Fri Aug 6 10:20:24 2021 +0200
Branches: master
https://developer.blender.org/rBd98791a106ffd1546ec476f3f38caeedd6f99047

Cleanup: clang tidy

`bugprone-signed-char-misuse`

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

M	source/blender/draw/intern/draw_cache_impl_gpencil.c
M	source/blender/editors/gpencil/gpencil_primitive.c

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

diff --git a/source/blender/draw/intern/draw_cache_impl_gpencil.c b/source/blender/draw/intern/draw_cache_impl_gpencil.c
index 2a476ab41bb..6ed4148a7fe 100644
--- a/source/blender/draw/intern/draw_cache_impl_gpencil.c
+++ b/source/blender/draw/intern/draw_cache_impl_gpencil.c
@@ -553,7 +553,7 @@ bGPDstroke *DRW_cache_gpencil_sbuffer_stroke_data_get(Object *ob)
     gps->runtime.stroke_start = 1; /* Add one for the adjacency index. */
     copy_v4_v4(gps->vert_color_fill, gpd->runtime.vert_color_fill);
     /* Caps. */
-    gps->caps[0] = gps->caps[1] = brush->gpencil_settings->caps_type;
+    gps->caps[0] = gps->caps[1] = (short)brush->gpencil_settings->caps_type;
 
     gpd->runtime.sbuffer_gps = gps;
   }
diff --git a/source/blender/editors/gpencil/gpencil_primitive.c b/source/blender/editors/gpencil/gpencil_primitive.c
index 27374f21b66..7e6ff53de14 100644
--- a/source/blender/editors/gpencil/gpencil_primitive.c
+++ b/source/blender/editors/gpencil/gpencil_primitive.c
@@ -336,7 +336,7 @@ static void gpencil_primitive_set_initdata(bContext *C, tGPDprimitive *tgpi)
   gps->inittime = 0.0f;
 
   /* Set stroke caps. */
-  gps->caps[0] = gps->caps[1] = brush->gpencil_settings->caps_type;
+  gps->caps[0] = gps->caps[1] = (short)brush->gpencil_settings->caps_type;
 
   /* Apply the vertex color to fill. */
   ED_gpencil_fill_vertex_color_set(ts, brush, gps);



More information about the Bf-blender-cvs mailing list