[Bf-blender-cvs] [341b078d919] functions: allow creating small vector with different size from array ref
Jacques Lucke
noreply at git.blender.org
Mon May 20 11:20:03 CEST 2019
Commit: 341b078d919999b8821233c459549a8eefeaa0d8
Author: Jacques Lucke
Date: Mon May 20 11:06:53 2019 +0200
Branches: functions
https://developer.blender.org/rB341b078d919999b8821233c459549a8eefeaa0d8
allow creating small vector with different size from array ref
===================================================================
M source/blender/blenlib/BLI_array_ref.hpp
===================================================================
diff --git a/source/blender/blenlib/BLI_array_ref.hpp b/source/blender/blenlib/BLI_array_ref.hpp
index af81fed9cf3..9b8e1168c15 100644
--- a/source/blender/blenlib/BLI_array_ref.hpp
+++ b/source/blender/blenlib/BLI_array_ref.hpp
@@ -99,9 +99,9 @@ template<typename T> class ArrayRef {
return counter;
}
- SmallVector<T> to_small_vector() const
+ template<uint N = 4> SmallVector<T, N> to_small_vector() const
{
- SmallVector<T> vector;
+ SmallVector<T, N> vector;
for (T &value : *this) {
vector.append(value);
}
More information about the Bf-blender-cvs
mailing list