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/animation/keyframes_edit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/animation/keyframes_edit.c') diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c index de2525ee150..6f6b5232fa7 100644 --- a/source/blender/editors/animation/keyframes_edit.c +++ b/source/blender/editors/animation/keyframes_edit.c @@ -949,8 +949,8 @@ static void mirror_bezier_xaxis_ex(BezTriple *bezt, const float center) } swap_v3_v3(bezt->vec[0], bezt->vec[2]); - SWAP(char, bezt->h1, bezt->h2); - SWAP(char, bezt->f1, bezt->f3); + SWAP(uint8_t, bezt->h1, bezt->h2); + SWAP(uint8_t, bezt->f1, bezt->f3); } static void mirror_bezier_yaxis_ex(BezTriple *bezt, const float center) -- cgit v1.2.3