[Bf-blender-cvs] [84272ce19a5] blender-v3.3-release: Fix: add missing return
Jacques Lucke
noreply at git.blender.org
Wed Jul 27 17:58:05 CEST 2022
Commit: 84272ce19a5777ef89fb3e50b5a7afb30658658b
Author: Jacques Lucke
Date: Wed Jul 27 17:54:49 2022 +0200
Branches: blender-v3.3-release
https://developer.blender.org/rB84272ce19a5777ef89fb3e50b5a7afb30658658b
Fix: add missing return
It was correct but less efficient without this early return.
===================================================================
M source/blender/blenlib/BLI_generic_virtual_array.hh
===================================================================
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;
More information about the Bf-blender-cvs
mailing list