[Bf-blender-cvs] [d67b7f3b523] master: Functions: use raw allocator for function signature

Jacques Lucke noreply at git.blender.org
Tue Jun 30 18:20:21 CEST 2020


Commit: d67b7f3b5236d636d5bd35a917d13b9f06452df0
Author: Jacques Lucke
Date:   Tue Jun 30 18:01:14 2020 +0200
Branches: master
https://developer.blender.org/rBd67b7f3b5236d636d5bd35a917d13b9f06452df0

Functions: use raw allocator for function signature

This allows multi-functions to have static storage duration.

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

M	source/blender/functions/FN_multi_function_signature.hh

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

diff --git a/source/blender/functions/FN_multi_function_signature.hh b/source/blender/functions/FN_multi_function_signature.hh
index 73e7b9bb18d..77a8ce14c03 100644
--- a/source/blender/functions/FN_multi_function_signature.hh
+++ b/source/blender/functions/FN_multi_function_signature.hh
@@ -33,9 +33,10 @@ namespace fn {
 
 struct MFSignature {
   std::string function_name;
-  Vector<std::string> param_names;
-  Vector<MFParamType> param_types;
-  Vector<uint> param_data_indices;
+  /* Use RawAllocator so that a MultiFunction can have static storage duration. */
+  Vector<std::string, 4, RawAllocator> param_names;
+  Vector<MFParamType, 4, RawAllocator> param_types;
+  Vector<uint, 4, RawAllocator> param_data_indices;
 
   uint data_index(uint param_index) const
   {



More information about the Bf-blender-cvs mailing list