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:
authorCampbell Barton <campbell@blender.org>2022-04-06 02:40:11 +0300
committerFabian Schempp <fabianschempp@googlemail.com>2022-04-11 01:31:58 +0300
commit3e1243622caf0edc54d9361c993ea5f15692ff87 (patch)
tree45a7e2de166df7720ad39df3b788ad289e40d422
parent38cbdd647c67af1d9a694c1f31d7a2f5aa844a9e (diff)
Cleanup: quiet compiler warnings
Ideally this wouldn't be needed, I couldn't find a good solution to avoid casting when comparing const/non-const pointers in this case.
-rw-r--r--source/blender/blenkernel/intern/attribute.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/attribute.c b/source/blender/blenkernel/intern/attribute.c
index 13c896fd1ab..c3d4eb72c0d 100644
--- a/source/blender/blenkernel/intern/attribute.c
+++ b/source/blender/blenkernel/intern/attribute.c
@@ -93,7 +93,7 @@ static CustomData *attribute_customdata_find(ID *id, CustomDataLayer *layer)
for (AttributeDomain domain = 0; domain < ATTR_DOMAIN_NUM; domain++) {
CustomData *customdata = info[domain].customdata;
if (customdata &&
- ARRAY_HAS_ITEM(layer, (CustomDataLayer const *)customdata->layers, customdata->totlayer)) {
+ ARRAY_HAS_ITEM((CustomDataLayer *)layer, customdata->layers, customdata->totlayer)) {
return customdata;
}
}
@@ -299,7 +299,8 @@ AttributeDomain BKE_id_attribute_domain(ID *id, const CustomDataLayer *layer)
for (AttributeDomain domain = 0; domain < ATTR_DOMAIN_NUM; domain++) {
CustomData *customdata = info[domain].customdata;
- if (customdata && ARRAY_HAS_ITEM(layer, customdata->layers, customdata->totlayer)) {
+ if (customdata &&
+ ARRAY_HAS_ITEM((CustomDataLayer *)layer, customdata->layers, customdata->totlayer)) {
return domain;
}
}
@@ -315,7 +316,8 @@ int BKE_id_attribute_data_length(ID *id, CustomDataLayer *layer)
for (AttributeDomain domain = 0; domain < ATTR_DOMAIN_NUM; domain++) {
CustomData *customdata = info[domain].customdata;
- if (customdata && ARRAY_HAS_ITEM(layer, customdata->layers, customdata->totlayer)) {
+ if (customdata &&
+ ARRAY_HAS_ITEM((CustomDataLayer *)layer, customdata->layers, customdata->totlayer)) {
return info[domain].length;
}
}