diff options
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llmenugl.h | 4 | ||||
-rw-r--r-- | indra/llui/lluictrl.cpp | 2 | ||||
-rw-r--r-- | indra/llui/lluictrl.h | 10 |
3 files changed, 8 insertions, 8 deletions
diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h index 79f83b5773..98b76c08ff 100644 --- a/indra/llui/llmenugl.h +++ b/indra/llui/llmenugl.h @@ -950,11 +950,11 @@ public: LLUICtrl::EnableCallbackRegistry::currentRegistrar().add(name, boost::bind(&view_listener_t::handleEvent, listener, _2)); } - typedef LLUICtrl::LLCommitCallbackInfo cb_info; + typedef LLUICtrl::CommitCallbackInfo cb_info; static void addCommit(view_listener_t *listener, const std::string &name, cb_info::EUntrustedCall handle_untrusted = cb_info::UNTRUSTED_ALLOW) { LLUICtrl::SharedCommitCallbackRegistry::currentRegistrar().add(name, - cb_info(boost::bind(&view_listener_t::handleEvent, listener, _2), handle_untrusted)); + cb_info([listener](LLUICtrl*, const LLSD& param){ return listener->handleEvent(param); }, handle_untrusted)); } static void addMenu(view_listener_t *listener, const std::string &name, cb_info::EUntrustedCall handle_untrusted = cb_info::UNTRUSTED_ALLOW) diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp index 0fa43081ba..6082a8f771 100644 --- a/indra/llui/lluictrl.cpp +++ b/indra/llui/lluictrl.cpp @@ -284,7 +284,7 @@ LLUICtrl::commit_signal_t::slot_type LLUICtrl::initCommitCallback(const CommitCa std::string function_name = cb.function_name; setFunctionName(function_name); commit_callback_t* func = (CommitCallbackRegistry::getValue(function_name)); - LLUICtrl::LLCommitCallbackInfo *info = LLUICtrl::SharedCommitCallbackRegistry::getValue(function_name); + LLUICtrl::CommitCallbackInfo *info = LLUICtrl::SharedCommitCallbackRegistry::getValue(function_name); if (func) { if (cb.parameter.isProvided()) diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h index 790c483aee..e507178d89 100644 --- a/indra/llui/lluictrl.h +++ b/indra/llui/lluictrl.h @@ -284,7 +284,7 @@ public: LLSINGLETON_EMPTY_CTOR(EnableCallbackRegistry); }; - struct LLCommitCallbackInfo + struct CommitCallbackInfo { enum EUntrustedCall { @@ -293,16 +293,16 @@ public: UNTRUSTED_THROTTLE }; - LLCommitCallbackInfo(commit_callback_t func = NULL, EUntrustedCall handle_untrusted = UNTRUSTED_ALLOW) - : callback_func(func), mHandleUntrusted(handle_untrusted) + CommitCallbackInfo(commit_callback_t func = {}, EUntrustedCall handle_untrusted = UNTRUSTED_ALLOW) + : callback_func(func), handle_untrusted(handle_untrusted) {} public: - EUntrustedCall mHandleUntrusted; commit_callback_t callback_func; + EUntrustedCall handle_untrusted; }; - class SharedCommitCallbackRegistry : public CallbackRegistry<LLCommitCallbackInfo, SharedCommitCallbackRegistry> + class SharedCommitCallbackRegistry : public CallbackRegistry<CommitCallbackInfo, SharedCommitCallbackRegistry> { LLSINGLETON_EMPTY_CTOR(SharedCommitCallbackRegistry); }; |