aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/FbTk/Slot.hh9
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
80class SlotImpl: public Slot<ReturnType, Arg1, Arg2, Arg3> { 80class SlotImpl: public Slot<ReturnType, Arg1, Arg2, Arg3> {
81public: 81public:
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:
92template<typename Functor, typename ReturnType, typename Arg1, typename Arg2> 92template<typename Functor, typename ReturnType, typename Arg1, typename Arg2>
93class SlotImpl<Functor, ReturnType, Arg1, Arg2, SigImpl::EmptyArg>: public Slot<ReturnType, Arg1, Arg2> { 93class SlotImpl<Functor, ReturnType, Arg1, Arg2, SigImpl::EmptyArg>: public Slot<ReturnType, Arg1, Arg2> {
94public: 94public:
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:
104template<typename Functor, typename ReturnType, typename Arg1> 105template<typename Functor, typename ReturnType, typename Arg1>
105class SlotImpl<Functor, ReturnType, Arg1, SigImpl::EmptyArg, SigImpl::EmptyArg>: public Slot<ReturnType, Arg1> { 106class SlotImpl<Functor, ReturnType, Arg1, SigImpl::EmptyArg, SigImpl::EmptyArg>: public Slot<ReturnType, Arg1> {
106public: 107public:
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:
116template<typename Functor, typename ReturnType> 117template<typename Functor, typename ReturnType>
117class SlotImpl<Functor, ReturnType, SigImpl::EmptyArg, SigImpl::EmptyArg, SigImpl::EmptyArg>: public Slot<ReturnType> { 118class SlotImpl<Functor, ReturnType, SigImpl::EmptyArg, SigImpl::EmptyArg, SigImpl::EmptyArg>: public Slot<ReturnType> {
118public: 119public:
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