[Bf-blender-cvs] [600a627f6e3] master: Cleanup: use abbreviated names for unsigned types in editors

Campbell Barton noreply at git.blender.org
Fri Apr 3 07:22:52 CEST 2020


Commit: 600a627f6e326f4542a876e6e82f771cd3da218f
Author: Campbell Barton
Date:   Fri Apr 3 16:21:24 2020 +1100
Branches: master
https://developer.blender.org/rB600a627f6e326f4542a876e6e82f771cd3da218f

Cleanup: use abbreviated names for unsigned types in editors

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

M	source/blender/editors/animation/anim_channels_defines.c
M	source/blender/editors/animation/anim_draw.c
M	source/blender/editors/animation/anim_ipo_utils.c
M	source/blender/editors/animation/anim_markers.c
M	source/blender/editors/animation/fmodifier_ui.c
M	source/blender/editors/animation/keyframes_draw.c
M	source/blender/editors/animation/keyframes_edit.c
M	source/blender/editors/animation/keyframes_general.c
M	source/blender/editors/animation/keyframing.c
M	source/blender/editors/animation/time_scrub_ui.c
M	source/blender/editors/armature/armature_select.c
M	source/blender/editors/armature/armature_utils.c
M	source/blender/editors/armature/pose_lib.c
M	source/blender/editors/armature/pose_select.c
M	source/blender/editors/curve/editcurve.c
M	source/blender/editors/curve/editcurve_paint.c
M	source/blender/editors/curve/editfont.c
M	source/blender/editors/gizmo_library/geometry/geom_arrow_gizmo.c
M	source/blender/editors/gizmo_library/geometry/geom_cube_gizmo.c
M	source/blender/editors/gizmo_library/geometry/geom_dial_gizmo.c
M	source/blender/editors/gizmo_library/gizmo_draw_utils.c
M	source/blender/editors/gizmo_library/gizmo_geometry.h
M	source/blender/editors/interface/interface_icons.c
M	source/blender/editors/interface/resources.c
M	source/blender/editors/mask/mask_draw.c
M	source/blender/editors/mask/mask_query.c
M	source/blender/editors/mesh/editface.c
M	source/blender/editors/mesh/editmesh_intersect.c
M	source/blender/editors/mesh/editmesh_knife.c
M	source/blender/editors/mesh/editmesh_rip.c
M	source/blender/editors/mesh/editmesh_tools.c
M	source/blender/editors/mesh/editmesh_utils.c
M	source/blender/editors/mesh/mesh_mirror.c
M	source/blender/editors/mesh/meshtools.c
M	source/blender/editors/metaball/mball_edit.c
M	source/blender/editors/object/object_add.c
M	source/blender/editors/object/object_bake_api.c
M	source/blender/editors/object/object_modifier.c
M	source/blender/editors/object/object_random.c
M	source/blender/editors/object/object_relations.c
M	source/blender/editors/object/object_remesh.c
M	source/blender/editors/object/object_transform.c
M	source/blender/editors/render/render_opengl.c
M	source/blender/editors/render/render_preview.c
M	source/blender/editors/render/render_shading.c
M	source/blender/editors/screen/glutil.c
M	source/blender/editors/screen/screen_draw.c
M	source/blender/editors/screen/screendump.c
M	source/blender/editors/sculpt_paint/paint_cursor.c
M	source/blender/editors/sculpt_paint/paint_image_2d.c
M	source/blender/editors/sculpt_paint/paint_image_proj.c
M	source/blender/editors/sculpt_paint/paint_utils.c
M	source/blender/editors/sculpt_paint/paint_vertex_color_ops.c
M	source/blender/editors/sculpt_paint/sculpt_uv.c
M	source/blender/editors/space_action/action_draw.c
M	source/blender/editors/space_clip/clip_dopesheet_draw.c
M	source/blender/editors/space_clip/clip_draw.c
M	source/blender/editors/space_clip/clip_editor.c
M	source/blender/editors/space_clip/clip_graph_draw.c
M	source/blender/editors/space_clip/clip_ops.c
M	source/blender/editors/space_file/file_draw.c
M	source/blender/editors/space_file/file_ops.c
M	source/blender/editors/space_file/filelist.c
M	source/blender/editors/space_graph/graph_edit.c
M	source/blender/editors/space_image/image_ops.c
M	source/blender/editors/space_image/image_sequence.c
M	source/blender/editors/space_nla/nla_draw.c
M	source/blender/editors/space_node/node_select.c
M	source/blender/editors/space_node/node_view.c
M	source/blender/editors/space_sequencer/sequencer_draw.c
M	source/blender/editors/space_sequencer/sequencer_scopes.c
M	source/blender/editors/space_sequencer/sequencer_view.c
M	source/blender/editors/space_text/text_format.c
M	source/blender/editors/space_text/text_ops.c
M	source/blender/editors/space_view3d/view3d_view.c
M	source/blender/editors/transform/transform.c
M	source/blender/editors/transform/transform_convert.c
M	source/blender/editors/transform/transform_draw_cursors.c
M	source/blender/editors/transform/transform_generics.c
M	source/blender/editors/transform/transform_orientations.c
M	source/blender/editors/transform/transform_snap.c
M	source/blender/editors/transform/transform_snap_object.c
M	source/blender/editors/uvedit/uvedit_ops.c
M	source/blender/editors/uvedit/uvedit_parametrizer.c
M	source/blender/editors/uvedit/uvedit_smart_stitch.c

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

diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index 67e899382bb..2c1b7f3fb76 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -856,7 +856,7 @@ static void acf_group_color(bAnimContext *ac, bAnimListElem *ale, float r_color[
   bool showGroupColors = acf_show_channel_colors(ac);
 
   if (showGroupColors && agrp->customCol) {
-    unsigned char cp[3];
+    uchar cp[3];
 
     /* highlight only for active */
     if (ale->flag & AGRP_ACTIVE) {
@@ -4395,7 +4395,7 @@ void ANIM_channel_draw(
   if (acf->name && !achannel_is_being_renamed(ac, acf, channel_index)) {
     const uiFontStyle *fstyle = UI_FSTYLE_WIDGET;
     char name[ANIM_CHAN_NAME_SIZE]; /* hopefully this will be enough! */
-    unsigned char col[4];
+    uchar col[4];
 
     /* set text color */
     /* XXX: if active, highlight differently? */
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c
index 96fd2e94a5e..4203c2677b7 100644
--- a/source/blender/editors/animation/anim_draw.c
+++ b/source/blender/editors/animation/anim_draw.c
@@ -71,7 +71,7 @@ void ANIM_draw_cfra_number(const bContext *C, View2D *v2d, short flag)
   const bool show_time = (flag & DRAWCFRA_UNIT_SECONDS) != 0;
 
   const uiFontStyle *fstyle = UI_FSTYLE_WIDGET;
-  unsigned char col[4];
+  uchar col[4];
   float color[4];
   float xscale, x, y;
   char numstr[32] = "  t  "; /* t is the character to start replacing from */
diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c
index f631d08f3e4..3613ca9eeda 100644
--- a/source/blender/editors/animation/anim_ipo_utils.c
+++ b/source/blender/editors/animation/anim_ipo_utils.c
@@ -203,7 +203,7 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
 #define HSV_BANDWIDTH 0.3f
 
 /* used to determine the color of F-Curves with FCURVE_COLOR_AUTO_RAINBOW set */
-// void fcurve_rainbow(unsigned int cur, unsigned int tot, float *out)
+// void fcurve_rainbow(uint cur, uint tot, float *out)
 void getcolor_fcurve_rainbow(int cur, int tot, float out[3])
 {
   float hsv[3], fac;
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index 8b0e9b22ce8..27d38cf625a 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -528,7 +528,7 @@ static void draw_markers_background(rctf *rect)
   uint pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
   immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
 
-  unsigned char shade[4];
+  uchar shade[4];
   UI_GetThemeColor4ubv(TH_TIME_SCRUB_BACKGROUND, shade);
 
   immUniformColor4ubv(shade);
diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c
index 9bdfd9cfe33..954daff560f 100644
--- a/source/blender/editors/animation/fmodifier_ui.c
+++ b/source/blender/editors/animation/fmodifier_ui.c
@@ -178,7 +178,7 @@ static void draw_modifier__generator(uiLayout *layout,
       const uiFontStyle *fstyle = UI_FSTYLE_WIDGET;
       float *cp = NULL;
       char xval[32];
-      unsigned int i;
+      uint i;
       int maxXWidth;
 
       /* draw polynomial order selector */
@@ -317,7 +317,7 @@ static void draw_modifier__generator(uiLayout *layout,
     case FCM_GENERATOR_POLYNOMIAL_FACTORISED: /* Factorized polynomial expression */
     {
       float *cp = NULL;
-      unsigned int i;
+      uint i;
 
       /* draw polynomial order selector */
       row = uiLayoutRow(layout, false);
diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c
index 4b3b730d0fe..37bfd7f396c 100644
--- a/source/blender/editors/animation/keyframes_draw.c
+++ b/source/blender/editors/animation/keyframes_draw.c
@@ -558,11 +558,11 @@ void draw_keyframe_shape(float x,
                          short key_type,
                          short mode,
                          float alpha,
-                         unsigned int pos_id,
-                         unsigned int size_id,
-                         unsigned int color_id,
-                         unsigned int outline_color_id,
-                         unsigned int flags_id,
+                         uint pos_id,
+                         uint size_id,
+                         uint color_id,
+                         uint outline_color_id,
+                         uint flags_id,
                          short handle_type,
                          short extreme_type)
 {
@@ -595,9 +595,9 @@ void draw_keyframe_shape(float x,
       size -= 0.8f * key_type;
   }
 
-  unsigned char fill_col[4];
-  unsigned char outline_col[4];
-  unsigned int flags = 0;
+  uchar fill_col[4];
+  uchar outline_col[4];
+  uint flags = 0;
 
   /* draw! */
   if (draw_fill) {
diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c
index 61488e7f63a..e22fddc6d67 100644
--- a/source/blender/editors/animation/keyframes_edit.c
+++ b/source/blender/editors/animation/keyframes_edit.c
@@ -79,7 +79,7 @@ short ANIM_fcurve_keyframes_loop(KeyframeEditData *ked,
 {
   BezTriple *bezt;
   short ok = 0;
-  unsigned int i;
+  uint i;
 
   /* sanity check */
   if (ELEM(NULL, fcu, fcu->bezt)) {
diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c
index c526c185383..fc9ec870496 100644
--- a/source/blender/editors/animation/keyframes_general.c
+++ b/source/blender/editors/animation/keyframes_general.c
@@ -1189,7 +1189,7 @@ short paste_animedit_keys(bAnimContext *ac,
      * one F-Curve has been pasted into.
      */
     for (pass = 0; pass < 3; pass++) {
-      unsigned int totmatch = 0;
+      uint totmatch = 0;
 
       for (ale = anim_data->first; ale; ale = ale->next) {
         /* Find buffer item to paste from:
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index e66ebb1928c..c22f1e0642b 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -494,7 +494,7 @@ int insert_vert_fcurve(
     FCurve *fcu, float x, float y, eBezTriple_KeyframeType keyframe_type, eInsertKeyFlags flag)
 {
   BezTriple beztr = {{{0}}};
-  unsigned int oldTot = fcu->totvert;
+  uint oldTot = fcu->totvert;
   int a;
 
   /* set all three points, for nicer start position
diff --git a/source/blender/editors/animation/time_scrub_ui.c b/source/blender/editors/animation/time_scrub_ui.c
index 25b8e78de92..7679995d9a4 100644
--- a/source/blender/editors/animation/time_scrub_ui.c
+++ b/source/blender/editors/animation/time_scrub_ui.c
@@ -95,7 +95,7 @@ static void draw_current_frame(const Scene *scene,
                                int current_frame)
 {
   const uiFontStyle *fstyle = UI_FSTYLE_WIDGET;
-  const unsigned char color[] = {255, 255, 255, 255};
+  const uchar color[] = {255, 255, 255, 255};
   int frame_x = UI_view2d_view_to_region_x(v2d, current_frame);
 
   char frame_str[64];
diff --git a/source/blender/editors/armature/armature_select.c b/source/blender/editors/armature/armature_select.c
index a8560f89a1a..700fe14ade6 100644
--- a/source/blender/editors/armature/armature_select.c
+++ b/source/blender/editors/armature/armature_select.c
@@ -176,7 +176,7 @@ static void *ed_armature_pick_bone_from_selectbuffer_impl(const bool is_editmode
   EditBone *ebone;
   void *firstunSel = NULL, *firstSel = NULL, *data;
   Base *firstunSel_base = NULL, *firstSel_base = NULL;
-  unsigned int hitresult;
+  uint hitresult;
   short i;
   bool takeNext = false;
   int minsel = 0xffffffff, minunsel = 0xffffffff;
@@ -334,7 +334,7 @@ static void *ed_armature_pick_bone_impl(
   Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C);
   ViewContext vc;
   rcti rect;
-  unsigned int buffer[MAXPICKBUF];
+  uint buffer[MAXPICKBUF];
   short hits;
 
   ED_view3d_viewcontext_init(C, &vc, depsgraph);
@@ -635,15 +635,15 @@ void ARMATURE_OT_select_linked_pick(wmOperatorType *ot)
  * \{ */
 
 /* utility function for get_nearest_editbonepoint */
-static int selectbuffer_ret_hits_12(unsigned int *UNUSED(buffer), const int hits12)
+static int selectbuffer_ret_hits_12(uint *UNUSED(buffer), const int hits12)
 {
   return hits12;
 }
 
-static int selectbuffer_ret_hits_5(unsigned int *buffer, const int hits12, const int hits5)
+static int selectbuffer_ret_hits_5(uint *buffer, const int hits12, const int hits5)
 {
   const int offs = 4 * hits12;
-  memcpy(buffer, buffer + offs, 4 * hits5 * sizeof(unsigned int));
+  memcpy(buffer, buffer + offs, 4 * hits5 * sizeof(uint));
   return hits5;
 }
 
diff --git a/source/blender/editors/armature/armature_utils.c b/source/blender/editors/armature/armature_utils.c
index 8f63f239abc..fe456324d9c 100644
--- a/source/blender/editors/armature/armature_utils.c
+++ b/source/blender/editors/armature/armature_utils.c
@@ -196,13 +196,12 @@ bool ED_armature_ebone_is_child_recursive(EditBone *ebone_parent, EditBone *ebon
  * \param ebone_child_tot: Size of the ebone_child array
  * \return The shared parent or NULL.
  */
-EditBone *ED_armature_ebone_find_shared_parent(EditBone *ebone_child[],
-                                               const unsigned int ebone_child_tot)
+EditBone *ED_armature_ebone_find_shared_parent(EditBone *ebone_child[], const uint ebone_child_tot)
 {
-  unsigned int i;
+  uint i;
   EditBone *ebone_iter;
 
-#define EBONE_TEMP_UINT(ebone) (*((unsigned int *)(&((ebone)->temp))))
+#define EBONE_TEMP_UINT(ebone) (*((uint *)(&((ebone)->temp))))
 
   /* clear all */
   for (i = 0; i < ebone_child_tot; i++) {
diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c
index f759808d08e..455e7cb2733 100644
--- a/source/blender/editors/armature/pose_lib.c
+++ b/source/blender/editors/armature/pose_lib.c
@@ -626,7 +626,7 @@ static int poselib_remove_exec(bContext *C, wmOperator *op)
   /* remove relevant keyframes */
   for (fcu = act

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list