[Bf-blender-cvs] [720edd0c308] functions-experimental-refactor: cleanup

Jacques Lucke noreply at git.blender.org
Tue Nov 5 15:54:59 CET 2019


Commit: 720edd0c308533e4121f1fc595cdf83ab8eda084
Author: Jacques Lucke
Date:   Tue Nov 5 11:53:24 2019 +0100
Branches: functions-experimental-refactor
https://developer.blender.org/rB720edd0c308533e4121f1fc595cdf83ab8eda084

cleanup

===================================================================

M	source/blender/blenlib/BLI_virtual_list_ref.h
M	source/blender/functions2/FN_multi_function_context.h

===================================================================

diff --git a/source/blender/blenlib/BLI_virtual_list_ref.h b/source/blender/blenlib/BLI_virtual_list_ref.h
index 2a561957a81..582794ce8e9 100644
--- a/source/blender/blenlib/BLI_virtual_list_ref.h
+++ b/source/blender/blenlib/BLI_virtual_list_ref.h
@@ -3,6 +3,8 @@
 
 #include "BLI_array_ref.h"
 
+#include <climits>
+
 namespace BLI {
 
 template<typename T> class VirtualListRef {
@@ -50,6 +52,11 @@ template<typename T> class VirtualListRef {
     return list;
   }
 
+  static VirtualListRef FromSingle_MaxSize(const T *data)
+  {
+    return VirtualListRef::FromSingle(data, UINT_MAX);
+  }
+
   static VirtualListRef FromFullArray(const T *data, uint size)
   {
     VirtualListRef list;
diff --git a/source/blender/functions2/FN_multi_function_context.h b/source/blender/functions2/FN_multi_function_context.h
index 1084f8f29f6..dddd577c0c9 100644
--- a/source/blender/functions2/FN_multi_function_context.h
+++ b/source/blender/functions2/FN_multi_function_context.h
@@ -72,7 +72,7 @@ class MFContextBuilder {
     static uint dummy_index = 0;
     m_context_ids.append(id);
     m_context_data.append(data);
-    m_context_indices.append(VirtualListRef<uint>::FromSingle(&dummy_index, INT_MAX));
+    m_context_indices.append(VirtualListRef<uint>::FromSingle_MaxSize(&dummy_index));
   }
 
   MFContext &build()



More information about the Bf-blender-cvs mailing list