[Bf-blender-cvs] [a4e82b6] depsgraph_refactor: Depsgraph: Remove binding code from our headers

Sergey Sharybin noreply at git.blender.org
Fri Dec 12 10:16:54 CET 2014


Commit: a4e82b63592c2958a8b636eec272d2ef4ed1c1b9
Author: Sergey Sharybin
Date:   Fri Dec 12 14:13:06 2014 +0500
Branches: depsgraph_refactor
https://developer.blender.org/rBa4e82b63592c2958a8b636eec272d2ef4ed1c1b9

Depsgraph: Remove binding code from our headers

This seemed to be some sort of experiment to avoid using c++11 and boost
and was never removed, even though c++11 was made a requirement.

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

M	source/blender/depsgraph/intern/depsgraph_build.h
M	source/blender/depsgraph/intern/depsgraph_build_nodes.cpp

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

diff --git a/source/blender/depsgraph/intern/depsgraph_build.h b/source/blender/depsgraph/intern/depsgraph_build.h
index 63d33c8..5be13c4 100644
--- a/source/blender/depsgraph/intern/depsgraph_build.h
+++ b/source/blender/depsgraph/intern/depsgraph_build.h
@@ -27,10 +27,6 @@
 #ifndef __DEPSGRAPH_BUILD_H__
 #define __DEPSGRAPH_BUILD_H__
 
-#include <cstddef> /* for std::size_t */
-#include <tuple>
-#include <type_traits>
-
 #include "depsgraph_types.h"
 
 #include "depsgraph_util_id.h"
@@ -61,45 +57,6 @@ struct TimeSourceDepsNode;
 struct ComponentDepsNode;
 struct OperationDepsNode;
 
-namespace detail {
-
-using std::forward;
-using std::tuple;
-using std::tuple_size;
-using std::get;
-using std::size_t;
-
-template <size_t N>
-struct bind_operation_tuple_impl {
-	template <typename Func, typename... Args, typename... ArgsTail>
-	static DepsEvalOperationCb bind_operation_tuple(Func &&func, tuple<Args...> &&args, ArgsTail... tail)
-	{
-		typedef decltype(get<N-1>(args)) T;
-		T &&head = get<N-1>(args);
-		
-		return bind_operation_tuple_impl<N-1>::bind_operation_tuple(forward<Func>(func), forward<tuple<Args...>>(args), forward<T>(head), tail...);
-	}
-};
-
-template <>
-struct bind_operation_tuple_impl<0> {
-	template <typename Func, typename... Args, typename... ArgsTail>
-	static DepsEvalOperationCb bind_operation_tuple(Func &&func, tuple<Args...> &&args, ArgsTail... tail)
-	{
-		return std::bind(func, tail...);
-	}
-};
-
-} /* namespace detail */
-
-template <typename Func, typename... Args>
-static DepsEvalOperationCb bind_operation(Func func, Args... args)
-{
-	typedef std::tuple_size<std::tuple<Args...>> args_size;
-	
-	return detail::bind_operation_tuple_impl<args_size::value>::bind_operation_tuple(func, std::tuple<Args...>(args...));
-}
-
 struct DepsgraphNodeBuilder {
 	DepsgraphNodeBuilder(Main *bmain, Depsgraph *graph);
 	~DepsgraphNodeBuilder();
diff --git a/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp b/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
index 388e71a..9ee04f6 100644
--- a/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
+++ b/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
@@ -298,7 +298,7 @@ void DepsgraphNodeBuilder::build_object_transform(Scene *scene, Object *ob)
 {
 	/* init operation */
 	add_operation_node(&ob->id, DEPSNODE_TYPE_TRANSFORM,
-	                   DEPSOP_TYPE_INIT, bind_operation(BKE_object_eval_local_transform, _1, scene, ob),
+	                   DEPSOP_TYPE_INIT, bind(BKE_object_eval_local_transform, _1, scene, ob),
 	                   deg_op_name_object_local_transform);
 }




More information about the Bf-blender-cvs mailing list