diff options
author | Julian Eisel <julian@blender.org> | 2022-08-18 21:15:36 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2022-08-18 21:22:55 +0300 |
commit | d2255aa4ed6d6b3fc3a42871a649682e357a305e (patch) | |
tree | b9f26ef1bf0548fb29b91431e9423f55db37a7fd /source/blender/editors/space_outliner/outliner_utils.cc | |
parent | 75cca8360f611f6b79b65228d18fd6597267417f (diff) |
Outliner: Refactor outliner tree-hash interfaces with C++
- Turn storage into an object with "automatic" memory management (RAII)
so freeing is implicit and reliable.
- Turn functions into member functions, to have the data and its
functions close together with controlled access that increases
encapsulation and hiding implementation details.
- Use references to indicate null is not an expected value.
- Related minor cleanup (comments, use const etc.)
Couldn't spot any changes in performance.
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, 1 insertions, 2 deletions
diff --git a/source/blender/editors/space_outliner/outliner_utils.cc b/source/blender/editors/space_outliner/outliner_utils.cc index 9c1425befdd..2ce017f4f64 100644 --- a/source/blender/editors/space_outliner/outliner_utils.cc +++ b/source/blender/editors/space_outliner/outliner_utils.cc @@ -184,8 +184,7 @@ TreeElement *outliner_find_tse(SpaceOutliner *space_outliner, const TreeStoreEle } /* Check if 'tse' is in tree-store. */ - tselem = BKE_outliner_treehash_lookup_any( - space_outliner->runtime->treehash, tse->type, tse->nr, tse->id); + tselem = space_outliner->runtime->tree_hash->lookup_any(tse->type, tse->nr, tse->id); if (tselem) { return outliner_find_tree_element(&space_outliner->tree, tselem); } |