From f5e7221fbdc3277528b0cd8da4e9b3e0197e334f Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Tue, 14 Jun 2022 17:25:53 +0200 Subject: Cleanup: Fix const correctness of attribute search function Retrieving a mutable custom data layer from a const ID should not be possible. --- source/blender/blenkernel/BKE_attribute.h | 2 +- source/blender/blenkernel/intern/attribute.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/blenkernel/BKE_attribute.h b/source/blender/blenkernel/BKE_attribute.h index 18993546e83..13eefd27bec 100644 --- a/source/blender/blenkernel/BKE_attribute.h +++ b/source/blender/blenkernel/BKE_attribute.h @@ -72,7 +72,7 @@ struct CustomDataLayer *BKE_id_attribute_find(const struct ID *id, int type, eAttrDomain domain); -struct CustomDataLayer *BKE_id_attribute_search(const struct ID *id, +struct CustomDataLayer *BKE_id_attribute_search(struct ID *id, const char *name, eCustomDataMask type, eAttrDomainMask domain_mask); diff --git a/source/blender/blenkernel/intern/attribute.cc b/source/blender/blenkernel/intern/attribute.cc index 7bc51881f1f..7c09b4a4ce3 100644 --- a/source/blender/blenkernel/intern/attribute.cc +++ b/source/blender/blenkernel/intern/attribute.cc @@ -300,7 +300,7 @@ CustomDataLayer *BKE_id_attribute_find(const ID *id, return nullptr; } -CustomDataLayer *BKE_id_attribute_search(const ID *id, +CustomDataLayer *BKE_id_attribute_search(ID *id, const char *name, const eCustomDataMask type_mask, const eAttrDomainMask domain_mask) -- cgit v1.2.3