diff options
author | Rider Linden <rider@lindenlab.com> | 2015-12-21 15:37:52 -0800 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2015-12-21 15:37:52 -0800 |
commit | c6fd58f0c4ba098d2c4a3d9abc70c8152b50e54a (patch) | |
tree | 34bcbffcf64aa009b7fcb8771fa637f6f553ef28 /indra/llcommon/lleventcoro.h | |
parent | 3edc3c5554965b947a8086c9f4f95a28b3a7aaa8 (diff) | |
parent | a0a0288f6ae017e0a5a64756820dc2901a3b0459 (diff) |
Merged in nat_linden/viewer-azumarill-vivox (pull request #2)
MAINT-5976: Fix bug in LLCoros::set_consuming() mechanism.
Diffstat (limited to 'indra/llcommon/lleventcoro.h')
-rwxr-xr-x | indra/llcommon/lleventcoro.h | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/indra/llcommon/lleventcoro.h b/indra/llcommon/lleventcoro.h index acf2ad24a4..2105faf861 100755 --- a/indra/llcommon/lleventcoro.h +++ b/indra/llcommon/lleventcoro.h @@ -76,36 +76,6 @@ private: namespace llcoro { -typedef std::pair<LLSD, bool*> LLSD_consumed; - -/// This is an adapter for a signature like void LISTENER(const LLSD&), which -/// isn't a valid LLEventPump listener: such listeners should return bool. -template <typename LISTENER> -class VoidListener -{ -public: - VoidListener(const LISTENER& listener): - mListener(listener) - {} - - bool operator()(const LLSD& event) - { - bool consumed = false; - mListener(LLSD_consumed(event, &consumed)); - // tell upstream LLEventPump whether listener consumed - return consumed; - } -private: - LISTENER mListener; -}; - -/// VoidListener helper function to infer the type of the LISTENER -template <typename LISTENER> -VoidListener<LISTENER> voidlistener(const LISTENER& listener) -{ - return VoidListener<LISTENER>(listener); -} - /** * Yield control from a coroutine for one "mainloop" tick. If your coroutine * runs without suspending for nontrivial time, sprinkle in calls to this |