diff options
author | Jacques Lucke <jacques@blender.org> | 2022-07-27 18:54:49 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-07-27 18:54:49 +0300 |
commit | 84272ce19a5777ef89fb3e50b5a7afb30658658b (patch) | |
tree | cd1603640eb6f1b912a6edf2535a55d9d6037dd8 /source/blender/blenlib | |
parent | d61ab45385eba116dbfcbf6c5ccfb997be7e324f (diff) |
Fix: add missing return
It was correct but less efficient without this early return.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_generic_virtual_array.hh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_generic_virtual_array.hh b/source/blender/blenlib/BLI_generic_virtual_array.hh index 43ca16a894f..21549896f45 100644 --- a/source/blender/blenlib/BLI_generic_virtual_array.hh +++ b/source/blender/blenlib/BLI_generic_virtual_array.hh @@ -860,6 +860,7 @@ template<typename T> inline GVArray::GVArray(const VArray<T> &varray) * #this is destructed. */ if (info.type == CommonVArrayInfo::Type::Span && !info.may_have_ownership) { *this = GVArray::ForSpan(GSpan(CPPType::get<T>(), info.data, varray.size())); + return; } if (varray.try_assign_GVArray(*this)) { return; |