diff options
-rw-r--r-- | src/FbTk/Slot.hh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/FbTk/Slot.hh b/src/FbTk/Slot.hh index 71bf6ab..23be197 100644 --- a/src/FbTk/Slot.hh +++ b/src/FbTk/Slot.hh | |||
@@ -80,7 +80,7 @@ template<typename Functor, typename ReturnType, typename Arg1 = SigImpl::EmptyAr | |||
80 | class SlotImpl: public Slot<ReturnType, Arg1, Arg2, Arg3> { | 80 | class SlotImpl: public Slot<ReturnType, Arg1, Arg2, Arg3> { |
81 | public: | 81 | public: |
82 | virtual ReturnType operator()(Arg1 arg1, Arg2 arg2, Arg3 arg3) | 82 | virtual ReturnType operator()(Arg1 arg1, Arg2 arg2, Arg3 arg3) |
83 | { return m_functor(arg1, arg2, arg3); } | 83 | { return static_cast<ReturnType>(m_functor(arg1, arg2, arg3)); } |
84 | 84 | ||
85 | SlotImpl(Functor functor) : m_functor(functor) {} | 85 | SlotImpl(Functor functor) : m_functor(functor) {} |
86 | 86 | ||
@@ -92,7 +92,8 @@ private: | |||
92 | template<typename Functor, typename ReturnType, typename Arg1, typename Arg2> | 92 | template<typename Functor, typename ReturnType, typename Arg1, typename Arg2> |
93 | class SlotImpl<Functor, ReturnType, Arg1, Arg2, SigImpl::EmptyArg>: public Slot<ReturnType, Arg1, Arg2> { | 93 | class SlotImpl<Functor, ReturnType, Arg1, Arg2, SigImpl::EmptyArg>: public Slot<ReturnType, Arg1, Arg2> { |
94 | public: | 94 | public: |
95 | virtual ReturnType operator()(Arg1 arg1, Arg2 arg2) { return m_functor(arg1, arg2); } | 95 | virtual ReturnType operator()(Arg1 arg1, Arg2 arg2) |
96 | { return static_cast<ReturnType>(m_functor(arg1, arg2)); } | ||
96 | 97 | ||
97 | SlotImpl(Functor functor) : m_functor(functor) {} | 98 | SlotImpl(Functor functor) : m_functor(functor) {} |
98 | 99 | ||
@@ -104,7 +105,7 @@ private: | |||
104 | template<typename Functor, typename ReturnType, typename Arg1> | 105 | template<typename Functor, typename ReturnType, typename Arg1> |
105 | class SlotImpl<Functor, ReturnType, Arg1, SigImpl::EmptyArg, SigImpl::EmptyArg>: public Slot<ReturnType, Arg1> { | 106 | class SlotImpl<Functor, ReturnType, Arg1, SigImpl::EmptyArg, SigImpl::EmptyArg>: public Slot<ReturnType, Arg1> { |
106 | public: | 107 | public: |
107 | virtual ReturnType operator()(Arg1 arg1) { return m_functor(arg1); } | 108 | virtual ReturnType operator()(Arg1 arg1) { return static_cast<ReturnType>(m_functor(arg1)); } |
108 | 109 | ||
109 | SlotImpl(Functor functor) : m_functor(functor) {} | 110 | SlotImpl(Functor functor) : m_functor(functor) {} |
110 | 111 | ||
@@ -116,7 +117,7 @@ private: | |||
116 | template<typename Functor, typename ReturnType> | 117 | template<typename Functor, typename ReturnType> |
117 | class SlotImpl<Functor, ReturnType, SigImpl::EmptyArg, SigImpl::EmptyArg, SigImpl::EmptyArg>: public Slot<ReturnType> { | 118 | class SlotImpl<Functor, ReturnType, SigImpl::EmptyArg, SigImpl::EmptyArg, SigImpl::EmptyArg>: public Slot<ReturnType> { |
118 | public: | 119 | public: |
119 | virtual ReturnType operator()() { return m_functor(); } | 120 | virtual ReturnType operator()() { return static_cast<ReturnType>(m_functor()); } |
120 | 121 | ||
121 | SlotImpl(Functor functor) : m_functor(functor) {} | 122 | SlotImpl(Functor functor) : m_functor(functor) {} |
122 | 123 | ||