diff options
Diffstat (limited to 'source/blender/blenkernel/intern/collection.c')
-rw-r--r-- | source/blender/blenkernel/intern/collection.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c index fdffe7dca57..24266dc6bea 100644 --- a/source/blender/blenkernel/intern/collection.c +++ b/source/blender/blenkernel/intern/collection.c @@ -79,7 +79,8 @@ static bool collection_object_remove(Main *bmain, static CollectionChild *collection_find_child(Collection *parent, Collection *collection); static CollectionParent *collection_find_parent(Collection *child, Collection *collection); -static bool collection_find_child_recursive(Collection *parent, Collection *collection); +static bool collection_find_child_recursive(const Collection *parent, + const Collection *collection); /** \} */ @@ -1521,9 +1522,9 @@ static CollectionChild *collection_find_child(Collection *parent, Collection *co return BLI_findptr(&parent->children, collection, offsetof(CollectionChild, collection)); } -static bool collection_find_child_recursive(Collection *parent, Collection *collection) +static bool collection_find_child_recursive(const Collection *parent, const Collection *collection) { - LISTBASE_FOREACH (CollectionChild *, child, &parent->children) { + LISTBASE_FOREACH (const CollectionChild *, child, &parent->children) { if (child->collection == collection) { return true; } @@ -1536,7 +1537,7 @@ static bool collection_find_child_recursive(Collection *parent, Collection *coll return false; } -bool BKE_collection_has_collection(Collection *parent, Collection *collection) +bool BKE_collection_has_collection(const Collection *parent, const Collection *collection) { return collection_find_child_recursive(parent, collection); } |