Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2020-09-16 13:23:23 +0300
committerJacques Lucke <jacques@blender.org>2020-09-16 13:23:23 +0300
commit27a5da4dc3a399e1fe7e88dc8722a891e9cfcf78 (patch)
tree7ad797f8746a58e527ed301bf7bcab4a389bb687 /source/blender/blenkernel/BKE_curve.h
parentd376aea61840587eddcf75386b804673e5593d60 (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/blenkernel/BKE_curve.h')
-rw-r--r--source/blender/blenkernel/BKE_curve.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/BKE_curve.h b/source/blender/blenkernel/BKE_curve.h
index 5930578c505..344338d4802 100644
--- a/source/blender/blenkernel/BKE_curve.h
+++ b/source/blender/blenkernel/BKE_curve.h
@@ -171,11 +171,11 @@ void BKE_nurbList_duplicate(struct ListBase *lb1, const struct ListBase *lb2);
void BKE_nurbList_handles_set(struct ListBase *editnurb, const char code);
void BKE_nurbList_handles_recalculate(struct ListBase *editnurb,
const bool calc_length,
- const char flag);
+ const uint8_t flag);
-void BKE_nurbList_handles_autocalc(ListBase *editnurb, int flag);
-void BKE_nurbList_flag_set(ListBase *editnurb, short flag, bool set);
-bool BKE_nurbList_flag_set_from_flag(ListBase *editnurb, short from_flag, short flag);
+void BKE_nurbList_handles_autocalc(ListBase *editnurb, uint8_t flag);
+void BKE_nurbList_flag_set(ListBase *editnurb, uint8_t flag, bool set);
+bool BKE_nurbList_flag_set_from_flag(ListBase *editnurb, uint8_t from_flag, uint8_t flag);
void BKE_nurb_free(struct Nurb *nu);
struct Nurb *BKE_nurb_duplicate(const struct Nurb *nu);
@@ -260,7 +260,7 @@ void BKE_nurb_handle_calc_simple_auto(struct Nurb *nu, struct BezTriple *bezt);
void BKE_nurb_handle_smooth_fcurve(struct BezTriple *bezt, int total, bool cyclic);
void BKE_nurb_handles_calc(struct Nurb *nu);
-void BKE_nurb_handles_autocalc(struct Nurb *nu, int flag);
+void BKE_nurb_handles_autocalc(struct Nurb *nu, uint8_t flag);
void BKE_nurb_bezt_handle_test(struct BezTriple *bezt,
const eBezTriple_Flag__Alias sel_flag,
const bool use_handle,