diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-22 12:34:24 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-22 12:34:24 +0300 |
commit | 3472c0b5ef25dd9c9547a05a517366e46e6d9f78 (patch) | |
tree | e0abd956cafabf118a88b2bf06831dd3b64dbc1e /src/commandhandler.cpp | |
parent | aa85f15df21e65b42c62bcad25a331b944bf270f (diff) | |
download | mv-3472c0b5ef25dd9c9547a05a517366e46e6d9f78.tar.gz mv-3472c0b5ef25dd9c9547a05a517366e46e6d9f78.tar.bz2 mv-3472c0b5ef25dd9c9547a05a517366e46e6d9f78.tar.xz mv-3472c0b5ef25dd9c9547a05a517366e46e6d9f78.zip |
Use same function prototypes for action and command handlers.
Diffstat (limited to 'src/commandhandler.cpp')
-rw-r--r-- | src/commandhandler.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/commandhandler.cpp b/src/commandhandler.cpp index b594d8bda..0cf4f803c 100644 --- a/src/commandhandler.cpp +++ b/src/commandhandler.cpp @@ -107,11 +107,16 @@ void CommandHandler::callFunc(const CommandInfo &info, const std::string &args, ChatTab *const tab) { - const CommandFuncPtr func = info.func; + const ActionFuncPtr func = info.func; if (func) - func(args, tab); + { + InputEvent evt(args, tab); + func(evt); + } else + { inputManager.executeAction(info.actionId); + } } void CommandHandler::invokeCommand(const int type) |