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/editors/curve/curve_intern.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/editors/curve/curve_intern.h')
-rw-r--r--source/blender/editors/curve/curve_intern.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/curve/curve_intern.h b/source/blender/editors/curve/curve_intern.h
index 4426739e421..704e4b740de 100644
--- a/source/blender/editors/curve/curve_intern.h
+++ b/source/blender/editors/curve/curve_intern.h
@@ -71,8 +71,8 @@ typedef enum eCurveElem_Types {
} eCurveElem_Types;
/* internal select utils */
-bool select_beztriple(BezTriple *bezt, bool selstatus, short flag, eVisible_Types hidden);
-bool select_bpoint(BPoint *bp, bool selstatus, short flag, bool hidden);
+bool select_beztriple(BezTriple *bezt, bool selstatus, uint8_t flag, eVisible_Types hidden);
+bool select_bpoint(BPoint *bp, bool selstatus, uint8_t flag, bool hidden);
void FONT_OT_text_insert(struct wmOperatorType *ot);
void FONT_OT_line_break(struct wmOperatorType *ot);
@@ -142,8 +142,8 @@ struct GHash *ED_curve_keyindex_hash_duplicate(struct GHash *keyindex);
void ED_curve_keyindex_update_nurb(struct EditNurb *editnurb, struct Nurb *nu, struct Nurb *newnu);
/* helper functions */
-void ed_editnurb_translate_flag(struct ListBase *editnurb, short flag, const float vec[3]);
-bool ed_editnurb_extrude_flag(struct EditNurb *editnurb, const short flag);
+void ed_editnurb_translate_flag(struct ListBase *editnurb, uint8_t flag, const float vec[3]);
+bool ed_editnurb_extrude_flag(struct EditNurb *editnurb, const uint8_t flag);
bool ed_editnurb_spin(float viewmat[4][4],
struct View3D *v3d,
struct Object *obedit,