From 27a5da4dc3a399e1fe7e88dc8722a891e9cfcf78 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Wed, 16 Sep 2020 12:23:23 +0200 Subject: 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 --- source/blender/editors/curve/editcurve_select.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/curve/editcurve_select.c') diff --git a/source/blender/editors/curve/editcurve_select.c b/source/blender/editors/curve/editcurve_select.c index 4b502e9e336..aa4ba332b66 100644 --- a/source/blender/editors/curve/editcurve_select.c +++ b/source/blender/editors/curve/editcurve_select.c @@ -57,7 +57,7 @@ #include "DEG_depsgraph.h" /* returns 1 in case (de)selection was successful */ -bool select_beztriple(BezTriple *bezt, bool selstatus, short flag, eVisible_Types hidden) +bool select_beztriple(BezTriple *bezt, bool selstatus, uint8_t flag, eVisible_Types hidden) { if ((bezt->hide == 0) || (hidden == HIDDEN)) { if (selstatus == SELECT) { /* selects */ @@ -77,7 +77,7 @@ bool select_beztriple(BezTriple *bezt, bool selstatus, short flag, eVisible_Type } /* returns 1 in case (de)selection was successful */ -bool select_bpoint(BPoint *bp, bool selstatus, short flag, bool hidden) +bool select_bpoint(BPoint *bp, bool selstatus, uint8_t flag, bool hidden) { if ((bp->hide == 0) || (hidden == 1)) { if (selstatus == SELECT) { -- cgit v1.2.3