diff options
author | Hans Goudey <h.goudey@me.com> | 2022-08-26 18:57:35 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-08-26 18:57:43 +0300 |
commit | aaea263be4d0ffc5b23ac5752a1d15d31eb9c7ca (patch) | |
tree | 57fc7099a9464f4b88f792593cc0ef267dc92ee4 /source/blender/blenkernel/intern | |
parent | 51178fd4da90c3b5c2c5767fe54dd3189ca047a6 (diff) |
Cleanup: Fix const correctness in CustomData set name function
The function does modify the object since it changes the name of a layer
it owns. Ideally this wouldn't be possible, but raw pointers don't have
ownership semantics so this is a common problem with CustomData.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/customdata.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/customdata.cc b/source/blender/blenkernel/intern/customdata.cc index 90bc79f6907..6d89e1621d5 100644 --- a/source/blender/blenkernel/intern/customdata.cc +++ b/source/blender/blenkernel/intern/customdata.cc @@ -3537,10 +3537,7 @@ int CustomData_get_offset_named(const CustomData *data, int type, const char *na return data->layers[layer_index].offset; } -bool CustomData_set_layer_name(const CustomData *data, - const int type, - const int n, - const char *name) +bool CustomData_set_layer_name(CustomData *data, const int type, const int n, const char *name) { /* get the layer index of the first layer of type */ const int layer_index = CustomData_get_layer_index_n(data, type, n); |