From 38596ac941bded18b7142622788a424dfa0b3f7e Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Tue, 3 Aug 2021 00:21:05 -0500 Subject: [PATCH] [ox/event] Move isError into namepsace detail --- deps/ox/src/ox/event/signal.hpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/deps/ox/src/ox/event/signal.hpp b/deps/ox/src/ox/event/signal.hpp index 4cea924c..a9c40995 100644 --- a/deps/ox/src/ox/event/signal.hpp +++ b/deps/ox/src/ox/event/signal.hpp @@ -19,6 +19,8 @@ class SignalHandler; #ifndef OX_OS_BareMetal +namespace detail { + template struct isError { static constexpr bool value = false; @@ -29,6 +31,8 @@ struct isError { static constexpr bool value = true; }; +} + template class Signal { private: @@ -52,7 +56,7 @@ class Signal { } void call(Args... args) final { - if constexpr(isError::value) { + if constexpr(detail::isError::value) { oxThrowError(f(args...)); } else { f(args...); @@ -71,7 +75,7 @@ class Signal { } void call(Args... args) final { - if constexpr(isError*(m_methodPtr))(args...))>::value) { + if constexpr(detail::isError*(m_methodPtr))(args...))>::value) { oxThrowError((m_receiver->*(m_methodPtr))(args...)); } else { f(args...); @@ -98,7 +102,7 @@ class Signal { } void call(Args... args) final { - if constexpr(isError*(m_methodPtr))(args...))>::value) { + if constexpr(detail::isError*(m_methodPtr))(args...))>::value) { oxThrowError((m_receiver->*(m_methodPtr))(args...)); } else { (m_receiver->*(m_methodPtr))(args...);