Cleanup: Use LISTBASE_FOREACH macro

This commit is contained in:
Hans Goudey 2022-07-28 16:02:46 -05:00
parent 72d8a40a3d
commit 5c2fff306e
1 changed files with 2 additions and 4 deletions

View File

@ -97,10 +97,8 @@ const EnumPropertyItem *ED_asset_library_reference_to_rna_enum_itemf(
RNA_enum_item_add_separator(&item, &totitem);
}
int i = 0;
for (bUserAssetLibrary *user_library = (bUserAssetLibrary *)U.asset_libraries.first;
user_library;
user_library = user_library->next, i++) {
int i;
LISTBASE_FOREACH_INDEX (bUserAssetLibrary *, user_library, &U.asset_libraries, i) {
/* Note that the path itself isn't checked for validity here. If an invalid library path is
* used, the Asset Browser can give a nice hint on what's wrong. */
const bool is_valid = (user_library->name[0] && user_library->path[0]);