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:
authorHans Goudey <h.goudey@me.com>2022-08-26 18:57:35 +0300
committerHans Goudey <h.goudey@me.com>2022-08-26 18:57:43 +0300
commitaaea263be4d0ffc5b23ac5752a1d15d31eb9c7ca (patch)
tree57fc7099a9464f4b88f792593cc0ef267dc92ee4 /source/blender/blenkernel/intern/customdata.cc
parent51178fd4da90c3b5c2c5767fe54dd3189ca047a6 (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/customdata.cc')
-rw-r--r--source/blender/blenkernel/intern/customdata.cc5
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);