[Bf-blender-cvs] [4e2ee7e9623] functions: remove unused code
Jacques Lucke
noreply at git.blender.org
Fri Sep 6 16:55:37 CEST 2019
Commit: 4e2ee7e962386a3fcdfd06404f5564037202721d
Author: Jacques Lucke
Date: Fri Sep 6 11:27:58 2019 +0200
Branches: functions
https://developer.blender.org/rB4e2ee7e962386a3fcdfd06404f5564037202721d
remove unused code
===================================================================
M source/blender/functions/backends/llvm/llvm_type_info.cpp
M source/blender/functions/backends/llvm/llvm_type_info.hpp
M source/blender/functions/types/external.cpp
M source/blender/functions/types/lists.cpp
===================================================================
diff --git a/source/blender/functions/backends/llvm/llvm_type_info.cpp b/source/blender/functions/backends/llvm/llvm_type_info.cpp
index 89442721d21..1dc24d11f6f 100644
--- a/source/blender/functions/backends/llvm/llvm_type_info.cpp
+++ b/source/blender/functions/backends/llvm/llvm_type_info.cpp
@@ -76,11 +76,6 @@ void PointerLLVMTypeInfo::free_value(PointerLLVMTypeInfo *info, void *value)
info->m_free_func(value);
}
-void *PointerLLVMTypeInfo::default_value(PointerLLVMTypeInfo *info)
-{
- return info->m_default_func();
-}
-
llvm::Value *PointerLLVMTypeInfo::build_copy_ir(CodeBuilder &builder, llvm::Value *value) const
{
auto *any_ptr_ty = builder.getAnyPtrTy();
diff --git a/source/blender/functions/backends/llvm/llvm_type_info.hpp b/source/blender/functions/backends/llvm/llvm_type_info.hpp
index b6dc0d77d85..f1feef827ae 100644
--- a/source/blender/functions/backends/llvm/llvm_type_info.hpp
+++ b/source/blender/functions/backends/llvm/llvm_type_info.hpp
@@ -110,19 +110,16 @@ class PointerLLVMTypeInfo : public LLVMTypeInfo {
private:
typedef std::function<void *(void *)> CopyFunc;
typedef std::function<void(void *)> FreeFunc;
- typedef std::function<void *()> DefaultFunc;
CopyFunc m_copy_func;
FreeFunc m_free_func;
- DefaultFunc m_default_func;
static void *copy_value(PointerLLVMTypeInfo *info, void *value);
static void free_value(PointerLLVMTypeInfo *info, void *value);
- static void *default_value(PointerLLVMTypeInfo *info);
public:
- PointerLLVMTypeInfo(CopyFunc copy_func, FreeFunc free_func, DefaultFunc default_func)
- : m_copy_func(copy_func), m_free_func(free_func), m_default_func(default_func)
+ PointerLLVMTypeInfo(CopyFunc copy_func, FreeFunc free_func)
+ : m_copy_func(copy_func), m_free_func(free_func)
{
}
diff --git a/source/blender/functions/types/external.cpp b/source/blender/functions/types/external.cpp
index b316f11a048..56c21b10f81 100644
--- a/source/blender/functions/types/external.cpp
+++ b/source/blender/functions/types/external.cpp
@@ -15,8 +15,8 @@ void INIT_external(Vector<Type *> &types_to_free)
{
TYPE_object = new Type("Object");
TYPE_object->add_extension<CPPTypeInfoForType<Object *>>();
- TYPE_object->add_extension<PointerLLVMTypeInfo>(
- [](void *value) { return value; }, [](void *UNUSED(value)) {}, []() { return nullptr; });
+ TYPE_object->add_extension<PointerLLVMTypeInfo>([](void *value) { return value; },
+ [](void *UNUSED(value)) {});
TYPE_object_list = new_list_type(TYPE_object);
diff --git a/source/blender/functions/types/lists.cpp b/source/blender/functions/types/lists.cpp
index 6d99e63e0fc..ea7b7be6203 100644
--- a/source/blender/functions/types/lists.cpp
+++ b/source/blender/functions/types/lists.cpp
@@ -45,11 +45,6 @@ Type *new_list_type(Type *base_type)
[](void *list) {
List *list_ = static_cast<List *>(list);
list_->decref();
- },
- /* Create a new empty list. */
- [base_type]() -> void * {
- List *list = new List(base_type);
- return static_cast<void *>(list);
});
return type;
}
More information about the Bf-blender-cvs
mailing list