diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2022-01-06 13:37:31 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2022-01-06 13:41:03 +0300 |
commit | f9aa6376f1a2b13ab12a77197257e9145f029792 (patch) | |
tree | 8ef47adab543467512f0795f869793078c5dbdd8 /source/blender/blenkernel/BKE_anim_data.h | |
parent | 1484fe260be9601fe88a21225e05483dc0c280d9 (diff) |
Cleanup: anim, remove `const` declarations from pass-by-value params
Remove `const` from pass-by-value parameters in function declarations.
The variables passed as parameters can never be modified by the function
anyway, so declaring them as `const` is meaningless. Having the
declaration there could confuse, especially as it suggests it does have
a meaning, training people to write meaningless code.
Diffstat (limited to 'source/blender/blenkernel/BKE_anim_data.h')
-rw-r--r-- | source/blender/blenkernel/BKE_anim_data.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/source/blender/blenkernel/BKE_anim_data.h b/source/blender/blenkernel/BKE_anim_data.h index a65efbd707c..bee8bde989c 100644 --- a/source/blender/blenkernel/BKE_anim_data.h +++ b/source/blender/blenkernel/BKE_anim_data.h @@ -46,7 +46,7 @@ struct bAction; /** * Check if the given ID-block can have AnimData. */ -bool id_type_can_have_animdata(const short id_type); +bool id_type_can_have_animdata(short id_type); bool id_can_have_animdata(const struct ID *id); /** @@ -84,7 +84,7 @@ bool BKE_animdata_action_ensure_idroot(const struct ID *owner, struct bAction *a /** * Free AnimData used by the nominated ID-block, and clear ID-block's AnimData pointer. */ -void BKE_animdata_free(struct ID *id, const bool do_id_user); +void BKE_animdata_free(struct ID *id, bool do_id_user); /** * Return true if the ID-block has non-empty AnimData. @@ -103,17 +103,14 @@ void BKE_animdata_foreach_id(struct AnimData *adt, struct LibraryForeachIDData * * see LIB_ID_CREATE_.../LIB_ID_COPY_... flags in BKE_lib_id.h * \return The copied animdata. */ -struct AnimData *BKE_animdata_copy(struct Main *bmain, struct AnimData *adt, const int flag); +struct AnimData *BKE_animdata_copy(struct Main *bmain, struct AnimData *adt, int flag); /** * \param flag: Control ID pointers management, * see LIB_ID_CREATE_.../LIB_ID_COPY_... flags in BKE_lib_id.h * \return true is successfully copied. */ -bool BKE_animdata_copy_id(struct Main *bmain, - struct ID *id_to, - struct ID *id_from, - const int flag); +bool BKE_animdata_copy_id(struct Main *bmain, struct ID *id_to, struct ID *id_from, int flag); /** * Copy AnimData Actions. |