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>2020-11-06 07:39:30 +0300
committerHans Goudey <h.goudey@me.com>2020-11-06 07:39:30 +0300
commit4f140ec7cc08e52eddae36f31bd7278506140679 (patch)
tree0eee333ffe835e1f10ab2166ee1e550bbc013a59 /source/blender/blenkernel/intern/layer.c
parent06c030eaa4051fa9fd8872ab58a015c3d081cf0d (diff)
Cleanup: Use LISTBASE_FOREACH macro
Diffstat (limited to 'source/blender/blenkernel/intern/layer.c')
-rw-r--r--source/blender/blenkernel/intern/layer.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c
index 5b88a68b921..4915ad4eaac 100644
--- a/source/blender/blenkernel/intern/layer.c
+++ b/source/blender/blenkernel/intern/layer.c
@@ -1450,12 +1450,9 @@ static LayerCollection *find_layer_collection_by_scene_collection(LayerCollectio
LayerCollection *BKE_layer_collection_first_from_scene_collection(ViewLayer *view_layer,
const Collection *collection)
{
- for (LayerCollection *layer_collection = view_layer->layer_collections.first;
- layer_collection != NULL;
- layer_collection = layer_collection->next) {
+ LISTBASE_FOREACH (LayerCollection *, layer_collection, &view_layer->layer_collections) {
LayerCollection *found = find_layer_collection_by_scene_collection(layer_collection,
collection);
-
if (found != NULL) {
return found;
}
@@ -1900,9 +1897,7 @@ void BKE_view_layer_blend_read_lib(BlendLibReader *reader, Library *lib, ViewLay
BLO_read_id_address(reader, lib, &fls->group);
}
- for (Base *base = view_layer->object_bases.first, *base_next = NULL; base; base = base_next) {
- base_next = base->next;
-
+ LISTBASE_FOREACH_MUTABLE (Base *, base, &view_layer->object_bases) {
/* we only bump the use count for the collection objects */
BLO_read_id_address(reader, lib, &base->object);