[libsigcplusplus] Remove unnecessary functor_base.



commit 330ab9707e884634fe33124294c13fed1e8ab116
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Apr 13 22:22:40 2016 +0200

    Remove unnecessary functor_base.
    
    It only existed as something to derive from to show that it had the
    result_type typedef.

 sigc++/adaptors/adaptor_base.h  |    2 +-
 sigc++/filelist.am              |    1 -
 sigc++/functors/functor_base.h  |   17 -----------------
 sigc++/functors/functor_trait.h |    1 -
 sigc++/functors/mem_fun.h       |    2 +-
 sigc++/functors/ptr_fun.h       |    2 +-
 sigc++/functors/slot_base.h     |    3 +--
 tests/test_bind.cc              |    4 ++--
 tests/test_exception_catch.cc   |    6 +++---
 tests/test_hide.cc              |    4 ++--
 tests/test_retype_return.cc     |    4 ++--
 tests/test_track_obj.cc         |    4 ++--
 12 files changed, 15 insertions(+), 35 deletions(-)
---
diff --git a/sigc++/adaptors/adaptor_base.h b/sigc++/adaptors/adaptor_base.h
index 55f412d..8902f26 100644
--- a/sigc++/adaptors/adaptor_base.h
+++ b/sigc++/adaptors/adaptor_base.h
@@ -16,7 +16,7 @@ namespace sigc
  *
  * @ingroup adaptors
  */
-struct adaptor_base : public functor_base
+struct adaptor_base
 {
 };
 
diff --git a/sigc++/filelist.am b/sigc++/filelist.am
index b53bef0..a65f8b9 100644
--- a/sigc++/filelist.am
+++ b/sigc++/filelist.am
@@ -49,7 +49,6 @@ sigc_public_h =                               \
        adaptors/track_obj.h \
        adaptors/retype_return.h \
        adaptors/tuple_visitor_visit_each.h \
-       functors/functor_base.h \
        functors/functor_trait.h                \
        functors/functors.h             \
        functors/mem_fun.h              \
diff --git a/sigc++/functors/functor_trait.h b/sigc++/functors/functor_trait.h
index d993dfe..3a78d8d 100644
--- a/sigc++/functors/functor_trait.h
+++ b/sigc++/functors/functor_trait.h
@@ -1,6 +1,5 @@
 #ifndef _SIGC_FUNCTORS_FUNCTOR_TRAIT_H_
 #define _SIGC_FUNCTORS_FUNCTOR_TRAIT_H_
-#include <sigc++/functors/functor_base.h>
 #include <sigc++/functors/mem_fun.h>
 #include <sigc++/functors/ptr_fun.h>
 #include <sigc++/type_traits.h>
diff --git a/sigc++/functors/mem_fun.h b/sigc++/functors/mem_fun.h
index b4c9c13..2672f66 100644
--- a/sigc++/functors/mem_fun.h
+++ b/sigc++/functors/mem_fun.h
@@ -69,7 +69,7 @@ namespace sigc
  */
 
 template <class T_func, class... T_arg>
-class mem_functor : public functor_base
+class mem_functor
 {
 public:
   using object_type = typename internal::member_method_class<T_func>::type;
diff --git a/sigc++/functors/ptr_fun.h b/sigc++/functors/ptr_fun.h
index cff269a..3d01fe5 100644
--- a/sigc++/functors/ptr_fun.h
+++ b/sigc++/functors/ptr_fun.h
@@ -53,7 +53,7 @@ template <class T_return, class... T_args>
 class pointer_functor;
 
 template <class T_return, class... T_args>
-class pointer_functor<T_return(T_args...)> : public functor_base
+class pointer_functor<T_return(T_args...)>
 {
   using function_type = T_return (*)(T_args...);
 
diff --git a/sigc++/functors/slot_base.h b/sigc++/functors/slot_base.h
index 56cabc8..286f301 100644
--- a/sigc++/functors/slot_base.h
+++ b/sigc++/functors/slot_base.h
@@ -21,7 +21,6 @@
 
 #include <sigc++config.h>
 #include <sigc++/trackable.h>
-#include <sigc++/functors/functor_base.h>
 
 namespace sigc
 {
@@ -275,7 +274,7 @@ struct SIGC_API slot_do_unbind
  *
  * @ingroup slot
  */
-class SIGC_API slot_base : public functor_base
+class SIGC_API slot_base
 {
   using rep_type = internal::slot_rep;
 
diff --git a/tests/test_bind.cc b/tests/test_bind.cc
index fd46fe8..66d6d0b 100644
--- a/tests/test_bind.cc
+++ b/tests/test_bind.cc
@@ -15,7 +15,7 @@ namespace
 {
 std::ostringstream result_stream;
 
-struct foo : public sigc::functor_base
+struct foo
 {
   // choose a type that can hold all return values
   using result_type = int;
@@ -39,7 +39,7 @@ struct foo : public sigc::functor_base
   }
 };
 
-struct foo_void : public sigc::functor_base
+struct foo_void
 {
   using result_type = void;
 
diff --git a/tests/test_exception_catch.cc b/tests/test_exception_catch.cc
index b8befd8..6267bdc 100644
--- a/tests/test_exception_catch.cc
+++ b/tests/test_exception_catch.cc
@@ -13,7 +13,7 @@ namespace
 {
 std::ostringstream result_stream;
 
-struct f : public sigc::functor_base
+struct f
 {
   using result_type = int;
 
@@ -24,7 +24,7 @@ struct f : public sigc::functor_base
   }
 };
 
-struct g : public sigc::functor_base
+struct g
 {
   using result_type = int;
 
@@ -35,7 +35,7 @@ struct g : public sigc::functor_base
   }
 };
 
-struct g_void : public sigc::functor_base
+struct g_void
 {
   using result_type = void;
 
diff --git a/tests/test_hide.cc b/tests/test_hide.cc
index e8724ab..0ff70fa 100644
--- a/tests/test_hide.cc
+++ b/tests/test_hide.cc
@@ -12,7 +12,7 @@ namespace
 {
 std::ostringstream result_stream;
 
-struct foo : public sigc::functor_base
+struct foo
 {
   // choose a type that can hold all return values
   using result_type = int;
@@ -30,7 +30,7 @@ struct foo : public sigc::functor_base
   }
 };
 
-struct foo_void : public sigc::functor_base
+struct foo_void
 {
   using result_type = void;
 
diff --git a/tests/test_retype_return.cc b/tests/test_retype_return.cc
index 99ddd0a..dd01b51 100644
--- a/tests/test_retype_return.cc
+++ b/tests/test_retype_return.cc
@@ -13,7 +13,7 @@ namespace
 {
 std::ostringstream result_stream;
 
-struct foo : public sigc::functor_base
+struct foo
 {
   using result_type = float;
 
@@ -30,7 +30,7 @@ struct foo : public sigc::functor_base
   }
 };
 
-struct bar : public sigc::trackable, public sigc::functor_base
+struct bar : public sigc::trackable
 {
   using result_type = int;
 
diff --git a/tests/test_track_obj.cc b/tests/test_track_obj.cc
index afe3af9..a880ef2 100644
--- a/tests/test_track_obj.cc
+++ b/tests/test_track_obj.cc
@@ -57,7 +57,7 @@ struct bar_group4 : public sigc::trackable
 {
 };
 
-class Functor1 : public sigc::functor_base
+class Functor1
 {
 public:
   using result_type = std::string;
@@ -70,7 +70,7 @@ private:
   const bar_group4& bar_;
 };
 
-class Functor2 : public sigc::functor_base
+class Functor2
 {
 public:
   using result_type = std::string;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]