return type, default void
This commit is contained in:
parent
7238e21fc5
commit
e76fda0c61
1 changed files with 2 additions and 2 deletions
|
@ -27,10 +27,10 @@
|
|||
namespace FbTk {
|
||||
|
||||
/// a simple command
|
||||
template <typename Receiver>
|
||||
template <typename Receiver, typename ReturnType=void>
|
||||
class SimpleCommand: public Command {
|
||||
public:
|
||||
typedef void (Receiver::* Action)();
|
||||
typedef ReturnType (Receiver::* Action)();
|
||||
SimpleCommand(Receiver &r, Action a):
|
||||
m_receiver(r), m_action(a) { }
|
||||
void execute() { (m_receiver.*m_action)(); }
|
||||
|
|
Loading…
Reference in a new issue