diff options
author | Jacques Lucke <jacques@blender.org> | 2020-09-16 13:23:23 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-09-16 13:23:23 +0300 |
commit | 27a5da4dc3a399e1fe7e88dc8722a891e9cfcf78 (patch) | |
tree | 7ad797f8746a58e527ed301bf7bcab4a389bb687 /source/blender/editors/space_view3d/view3d_select.c | |
parent | d376aea61840587eddcf75386b804673e5593d60 (diff) |
Cleanup: use uint8_t for various flags in curves
Previously, it was kind of a mess. In different places it was using `char`, `short` and `int`.
The changed properties are flags that are operated upon using bit operations. Therefore, the integer type should be unsigned. Since we only use 2 bits of these flags, `uint8_t` is large enough.
Especially note the change I had to make in `RNA_define.h` to make this work.
Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D8844
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_select.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_select.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 4bc64a337f5..a5ea8244a1f 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -933,7 +933,7 @@ static void do_lasso_select_curve__doSelect(void *userData, data->is_changed = true; } else { - char *flag_p = (&bezt->f1) + beztindex; + uint8_t *flag_p = (&bezt->f1) + beztindex; const bool is_select = *flag_p & SELECT; const int sel_op_result = ED_select_op_action_deselected(data->sel_op, is_select, is_inside); if (sel_op_result != -1) { @@ -2743,7 +2743,7 @@ static void do_nurbs_box_select__doSelect(void *userData, bezt->f1 = bezt->f3 = bezt->f2; } else { - char *flag_p = (&bezt->f1) + beztindex; + uint8_t *flag_p = (&bezt->f1) + beztindex; const bool is_select = *flag_p & SELECT; const int sel_op_result = ED_select_op_action_deselected(data->sel_op, is_select, is_inside); if (sel_op_result != -1) { |