diff options
author | Julian Eisel <julian@blender.org> | 2022-05-26 00:12:06 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2022-05-26 00:21:15 +0300 |
commit | dc6fe73e707fc224cfdff8457f63ef9c0eb0a04b (patch) | |
tree | 1b877b8947a9bdebe64dc44b7a35eff91efc9d91 /source/blender/editors/space_outliner/outliner_utils.cc | |
parent | a4a7af47326f6ca2ba881c3a2a25a0bdeed17c66 (diff) |
Outliner: Make use of new C++ based functional iterators
(Not meant to cause user visible changes.)
Makes use of the new iterators introduced in the previous commit. Some
benefits:
- Shorter, simpler, easier to read & understand
- Deduplicates logic
- Centralizes iteration logic, making it easier to replace tree storage
(as planned), see previous commit.
- Avoids having to pass (sub-)tree to iterate around (often redundant
since it's just `SpaceOutliner.tree`, even though `SpaceOutliner` is
already passed).
- Function arguments that are only passed to the recursive call are
recognized as unused (found and removed a few).
Also does some general cleanups while refactoring the code for the
iterators. Use `const`, use references (signals null is not expected),
early-exit (see 16fd5fa656af), remove redundant arguments, etc.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_utils.cc')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_utils.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/space_outliner/outliner_utils.cc b/source/blender/editors/space_outliner/outliner_utils.cc index 4b947154864..0db612ce6db 100644 --- a/source/blender/editors/space_outliner/outliner_utils.cc +++ b/source/blender/editors/space_outliner/outliner_utils.cc @@ -27,6 +27,9 @@ #include "UI_view2d.h" #include "outliner_intern.hh" +#include "tree/tree_iterator.hh" + +using namespace blender::ed::outliner; /* -------------------------------------------------------------------- */ /** \name Tree View Context |