diff options
author | Bastien Montagne <bastien@blender.org> | 2021-03-04 20:39:07 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-03-04 20:43:30 +0300 |
commit | 63b7ff9f4e5f5b0ff5d6bdb726fcd4e1d118e141 (patch) | |
tree | 815da9f2cad39c07d27f14613fbe4b9283e59739 /source/blender/editors | |
parent | f951aa063f7a002f4378d3f916750c5d917f4520 (diff) |
Cleanup: Main `foreach ID` code: Remove `MAX_LIBARRAY` and improve comments.
The `MAX_LIBARRAY` define was an annoying doublon to the `INDEX_ID_MAX` enum value
now defined in `DNA_ID.h`, and it is no more useful.
And comments were somewhat outdated. Also added an explanation about
chosen order for the `INDEX_ID_<IDTYPE>` order.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_outliner/tree/tree_display_libraries.cc | 2 | ||||
-rw-r--r-- | source/blender/editors/space_outliner/tree/tree_display_orphaned.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_outliner/tree/tree_display_libraries.cc b/source/blender/editors/space_outliner/tree/tree_display_libraries.cc index cb5f42f08e1..a81ce11498a 100644 --- a/source/blender/editors/space_outliner/tree/tree_display_libraries.cc +++ b/source/blender/editors/space_outliner/tree/tree_display_libraries.cc @@ -111,7 +111,7 @@ TreeElement *TreeDisplayLibraries::add_library_contents(Main &mainvar, { const short filter_id_type = id_filter_get(); - ListBase *lbarray[MAX_LIBARRAY]; + ListBase *lbarray[INDEX_ID_MAX]; int tot; if (filter_id_type) { lbarray[0] = which_libbase(&mainvar, space_outliner_.filter_id_type); diff --git a/source/blender/editors/space_outliner/tree/tree_display_orphaned.cc b/source/blender/editors/space_outliner/tree/tree_display_orphaned.cc index 0b17ea98831..559cb289f3f 100644 --- a/source/blender/editors/space_outliner/tree/tree_display_orphaned.cc +++ b/source/blender/editors/space_outliner/tree/tree_display_orphaned.cc @@ -42,7 +42,7 @@ TreeDisplayIDOrphans::TreeDisplayIDOrphans(SpaceOutliner &space_outliner) ListBase TreeDisplayIDOrphans::buildTree(const TreeSourceData &source_data) { ListBase tree = {nullptr}; - ListBase *lbarray[MAX_LIBARRAY]; + ListBase *lbarray[INDEX_ID_MAX]; short filter_id_type = (space_outliner_.filter & SO_FILTER_ID_TYPE) ? space_outliner_.filter_id_type : 0; |