summaryrefslogblamecommitdiff
path: root/user/rttr/no-pessimising-moves.patch
blob: 7ca6655fcb6888f133dc8ac59224a2e9f4b10db9 (plain) (tree)
































































                                                                                                                                                                   
From ea1e41f02ca1e32a9bbb731fec05708101c0e03f Mon Sep 17 00:00:00 2001
From: Andrey Davydov <andrey.a.davydov@gmail.com>
Date: Mon, 6 Jan 2020 15:11:47 +0300
Subject: [PATCH] fix pessimizing moves

---
 src/rttr/detail/registration/bind_impl.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/rttr/detail/registration/bind_impl.h b/src/rttr/detail/registration/bind_impl.h
index 7bb63278..606398a4 100644
--- a/src/rttr/detail/registration/bind_impl.h
+++ b/src/rttr/detail/registration/bind_impl.h
@@ -295,7 +295,7 @@ class registration::bind<detail::ctor_func, Class_Type, F, acc_level, Visitor_Li
                                                    std::move(get_metadata(std::forward<Args>(args)...)),
                                                    std::move(get_default_args<type_list<Acc_Func>, function_type>(std::forward<Args>(args)...)),
                                                    std::move(create_param_infos<type_list<F>, function_type>(std::forward<Args>(args)...)));
-            return std::move(ctor);
+            return ctor;
         }
     public:
         bind(const std::shared_ptr<detail::registration_executer>& reg_exec, F func)
@@ -397,6 +397,6 @@ class registration::bind<detail::prop, Class_Type, A, acc_level, Visitor_List> :
                                                              getter_policy, setter_policy,
                                                              Metadata_Count>>(name, type::get<Class_Type>(), acc, std::move(metadata_list));
-            return std::move(prop);
+            return prop;
         }
 
     public:
@@ -491,6 +491,6 @@ class registration::bind<detail::prop, Class_Type, A1, A2, acc_level, Visitor_Li
                                                              Metadata_Count>>(name, type::get<Class_Type>(),
                                                                               getter, setter, std::move(metadata_list));
-            return std::move(prop);
+            return prop;
         }
 
     public:
@@ -583,7 +583,7 @@ class registration::bind<detail::prop_readonly, Class_Type, A, acc_level, Visito
                                                             >
                                            >(name, acc, std::move(metadata_list));
 
-            return std::move(prop);
+            return prop;
         }
 
     public:
@@ -678,7 +678,7 @@ class registration::bind<detail::meth, Class_Type, F, acc_level, Visitor_List> :
                                                                      std::move(get_metadata(std::forward<Args>(args)...)),
                                                                      std::move(get_default_args<type_list<Acc_Func>, function_type>(std::forward<Args>(args)...)),
                                                                      std::move(create_param_infos<type_list<F>, function_type>(std::forward<Args>(args)...)) );
-            return std::move(meth);
+            return meth;
         }
 
         template<typename Policy, std::size_t Metadata_Count, typename...TArgs, typename...Param_Args>
@@ -791,7 +791,7 @@ class registration::bind<detail::enum_, Class_Type, Enum_Type> : public registra
                                                                                                 std::move(get_metadata(std::forward<Args>(args)...)));
 
 
-            return std::move(enum_wrapper);
+            return enum_wrapper;
         }
 
     public: