[Bf-blender-cvs] [0ca57c14af0] functions: rename extend to add_extension

Jacques Lucke noreply at git.blender.org
Thu May 2 11:44:59 CEST 2019


Commit: 0ca57c14af0a5e385245f8fd0f671164f87b2e0d
Author: Jacques Lucke
Date:   Thu May 2 11:21:52 2019 +0200
Branches: functions
https://developer.blender.org/rB0ca57c14af0a5e385245f8fd0f671164f87b2e0d

rename extend to add_extension

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

M	source/blender/functions/core/type.hpp
M	source/blender/functions/types/boolean.cpp
M	source/blender/functions/types/numeric.cpp
M	source/blender/functions/types/numeric_lists.cpp

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

diff --git a/source/blender/functions/core/type.hpp b/source/blender/functions/core/type.hpp
index 0b774e324e4..983863646d4 100644
--- a/source/blender/functions/core/type.hpp
+++ b/source/blender/functions/core/type.hpp
@@ -55,7 +55,7 @@ class Type final : public RefCountedBase {
     return m_extensions.get<T>();
   }
 
-  template<typename T, typename... Args> bool extend(Args &&... args)
+  template<typename T, typename... Args> bool add_extension(Args &&... args)
   {
     std::lock_guard<std::mutex> lock(m_extension_mutex);
     static_assert(std::is_base_of<TypeExtension, T>::value, "");
diff --git a/source/blender/functions/types/boolean.cpp b/source/blender/functions/types/boolean.cpp
index 33c7db570e4..7b797635da0 100644
--- a/source/blender/functions/types/boolean.cpp
+++ b/source/blender/functions/types/boolean.cpp
@@ -34,8 +34,8 @@ class LLVMBool : public TrivialLLVMTypeInfo {
 LAZY_INIT_REF__NO_ARG(SharedType, GET_TYPE_bool)
 {
   SharedType type = SharedType::New("Bool");
-  type->extend<CPPTypeInfoForType<bool>>();
-  type->extend<LLVMBool>();
+  type->add_extension<CPPTypeInfoForType<bool>>();
+  type->add_extension<LLVMBool>();
   return type;
 }
 
diff --git a/source/blender/functions/types/numeric.cpp b/source/blender/functions/types/numeric.cpp
index a214b1bf5a5..9423a59f93b 100644
--- a/source/blender/functions/types/numeric.cpp
+++ b/source/blender/functions/types/numeric.cpp
@@ -10,8 +10,8 @@ namespace Types {
 LAZY_INIT_REF__NO_ARG(SharedType, GET_TYPE_float)
 {
   SharedType type = SharedType::New("Float");
-  type->extend<CPPTypeInfoForType<float>>();
-  type->extend<PackedLLVMTypeInfo>(
+  type->add_extension<CPPTypeInfoForType<float>>();
+  type->add_extension<PackedLLVMTypeInfo>(
       [](llvm::LLVMContext &context) { return llvm::Type::getFloatTy(context); });
   return type;
 }
@@ -19,8 +19,8 @@ LAZY_INIT_REF__NO_ARG(SharedType, GET_TYPE_float)
 LAZY_INIT_REF__NO_ARG(SharedType, GET_TYPE_int32)
 {
   SharedType type = SharedType::New("Int32");
-  type->extend<CPPTypeInfoForType<int32_t>>();
-  type->extend<PackedLLVMTypeInfo>(
+  type->add_extension<CPPTypeInfoForType<int32_t>>();
+  type->add_extension<PackedLLVMTypeInfo>(
       [](llvm::LLVMContext &context) { return llvm::Type::getIntNTy(context, 32); });
   return type;
 }
@@ -67,8 +67,8 @@ class FloatVectorType : public TrivialLLVMTypeInfo {
 LAZY_INIT_REF__NO_ARG(SharedType, GET_TYPE_fvec3)
 {
   SharedType type = SharedType::New("FVec3");
-  type->extend<CPPTypeInfoForType<Vector>>();
-  type->extend<FloatVectorType>(3);
+  type->add_extension<CPPTypeInfoForType<Vector>>();
+  type->add_extension<FloatVectorType>(3);
   return type;
 }
 
diff --git a/source/blender/functions/types/numeric_lists.cpp b/source/blender/functions/types/numeric_lists.cpp
index 5274ae223f3..9737aa459c3 100644
--- a/source/blender/functions/types/numeric_lists.cpp
+++ b/source/blender/functions/types/numeric_lists.cpp
@@ -31,8 +31,8 @@ template<typename T> SharedType create_list_type(std::string name)
                 "Currently it is assumed that only a pointer to the list is stored");
 
   SharedType type = SharedType::New(name);
-  type->extend<CPPTypeInfoForType<SharedList<T>>>();
-  type->extend<PointerLLVMTypeInfo>(copy_func<T>, free_func<T>, default_func<T>);
+  type->add_extension<CPPTypeInfoForType<SharedList<T>>>();
+  type->add_extension<PointerLLVMTypeInfo>(copy_func<T>, free_func<T>, default_func<T>);
   return type;
 }



More information about the Bf-blender-cvs mailing list