summaryrefslogtreecommitdiff
path: root/src/bindings
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2016-06-20 19:35:50 -0300
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2016-06-20 19:35:50 -0300
commit9be8f029af6383f21d4d6b956afc29f4b0e244d3 (patch)
treec9d83e90c0f7f7cc115f7d4387a93f134e744134 /src/bindings
parente517571daeba751bccc7b81a879fa2860228f437 (diff)
downloadefl-9be8f029af6383f21d4d6b956afc29f4b0e244d3.tar.gz
eolian-cxx: Remove Eina_Bool from event function wrapper
Diffstat (limited to 'src/bindings')
-rw-r--r--src/bindings/cxx/eo_cxx/eo_event.hh42
1 files changed, 5 insertions, 37 deletions
diff --git a/src/bindings/cxx/eo_cxx/eo_event.hh b/src/bindings/cxx/eo_cxx/eo_event.hh
index 2120121cd8..a66a043d66 100644
--- a/src/bindings/cxx/eo_cxx/eo_event.hh
+++ b/src/bindings/cxx/eo_cxx/eo_event.hh
@@ -124,55 +124,23 @@ signal_connection make_signal_connection(std::unique_ptr<F>& data, Eo* eo, ::Eo_
namespace _detail {
template <typename T, typename P, typename F>
-Eina_Bool really_call_event(T& wrapper, F& f, void *, std::true_type, std::true_type)
+void really_call_event(T& wrapper, F& f, void *, std::true_type)
{
f(wrapper);
- return true;
}
template <typename T, typename P, typename F>
-Eina_Bool really_call_event(T& wrapper, F& f, void *info, std::true_type, std::false_type)
+void really_call_event(T& wrapper, F& f, void *info, std::false_type)
{
f(wrapper, convert_to_event<P>(info));
- return true;
-}
-template <typename T, typename P, typename F>
-Eina_Bool really_call_event(T& wrapper, F& f, void *, std::false_type, std::true_type)
-{
- return f(wrapper);
-}
-template <typename T, typename P, typename F>
-Eina_Bool really_call_event(T& wrapper, F& f, void *info, std::false_type, std::false_type)
-{
- return f(wrapper, convert_to_event<P>(info));
}
-template <typename T, typename P, typename F, typename Enable = void>
-struct is_void;
-template <typename T, typename P, typename F>
-struct is_void<T, P, F, typename std::enable_if
- <std::is_void<decltype(std::declval<F>()(std::declval<T>(), std::declval<P>()))>::value>::type>
- : std::true_type {};
-template <typename T, typename P, typename F>
-struct is_void<T, P, F, typename std::enable_if
- <!std::is_void<decltype(std::declval<F>()(std::declval<T>(), std::declval<P>()))>::value>::type>
- : std::false_type {};
-template <typename T, typename F>
-struct is_void<T, void, F, typename std::enable_if
- <std::is_void<decltype(std::declval<F>()(std::declval<T>()))>::value>::type>
- : std::true_type {};
-template <typename T, typename F>
-struct is_void<T, void, F, typename std::enable_if
- <!std::is_void<decltype(std::declval<F>()(std::declval<T>()))>::value>::type>
- : std::false_type {};
-
template <typename T, typename P, typename F>
-Eina_Bool
-event_callback(void *data, ::Eo_Event const* event)
+void event_callback(void *data, ::Eo_Event const* event)
{
T wrapper(::eo_ref(event->object));
F *f = static_cast<F*>(data);
- return _detail::really_call_event<T, P>
- (wrapper, *f, event->info, is_void<T, P, F>(), std::is_void<P>{});
+ _detail::really_call_event<T, P>
+ (wrapper, *f, event->info, std::is_void<P>{});
}
}