diff options
author | Bastien Montagne <bastien@blender.org> | 2022-05-25 13:23:11 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2022-05-25 13:23:11 +0300 |
commit | c64e9c6ae239adf0be09599cd9ea56522d43a42b (patch) | |
tree | 63e6dda91e89dd3bdc127e603b097f9d1c312022 /source/blender/makesrna/intern/rna_fcurve.c | |
parent | 4949dd54eb4576442050690f44b2c6ec7366e011 (diff) |
Cleanup: Add more const'ness to RNA API.
This commit makes PointerRNA passed to RNA path API const.
Main change was in the `path` callback for RNA structs, and indirectly
the `getlength` callback of properties.
Diffstat (limited to 'source/blender/makesrna/intern/rna_fcurve.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_fcurve.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c index af14a169d68..e14a291dd01 100644 --- a/source/blender/makesrna/intern/rna_fcurve.c +++ b/source/blender/makesrna/intern/rna_fcurve.c @@ -786,11 +786,11 @@ static void rna_FModifier_active_update(Main *bmain, Scene *scene, PointerRNA *p rna_FModifier_update(bmain, scene, ptr); } -static int rna_FModifierGenerator_coefficients_get_length(PointerRNA *ptr, +static int rna_FModifierGenerator_coefficients_get_length(const PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION]) { - FModifier *fcm = (FModifier *)ptr->data; - FMod_Generator *gen = fcm->data; + const FModifier *fcm = (FModifier *)ptr->data; + const FMod_Generator *gen = fcm->data; if (gen) { length[0] = gen->arraysize; |