diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2009-06-04 01:59:31 +0000 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2009-06-04 01:59:31 +0000 |
commit | 46291bf740f3eacd7030a64b319cce94551c8447 (patch) | |
tree | 67452af0f5d57feb1ab68cf56f802b81d034d89a | |
parent | de55fd54bfd558fdcbb4c3d3ecdc22a397f10fb9 (diff) |
DEV-32777: Make coroutine's top-level function accept value params, not
reference params.
-rw-r--r-- | indra/viewer_components/login/lllogin.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp index 575a709761..c6ed98c6b6 100644 --- a/indra/viewer_components/login/lllogin.cpp +++ b/indra/viewer_components/login/lllogin.cpp @@ -105,9 +105,12 @@ private: return response; } - typedef boost::coroutines::coroutine<void(const std::string&, const LLSD&)> coroutine_type; + typedef boost::coroutines::coroutine<void(std::string, LLSD)> coroutine_type; - void login_(coroutine_type::self& self, const std::string& uri, const LLSD& credentials); + // In a coroutine's top-level function args, do NOT NOT NOT accept + // references (const or otherwise) to anything but the self argument! Pass + // by value only! + void login_(coroutine_type::self& self, std::string uri, LLSD credentials); LLEventStream mPump; LLSD mAuthResponse, mValidAuthResponse; @@ -124,8 +127,7 @@ void LLLogin::Impl::connect(const std::string& uri, const LLSD& credentials) uri, credentials); } -void LLLogin::Impl::login_(coroutine_type::self& self, - const std::string& uri, const LLSD& credentials) +void LLLogin::Impl::login_(coroutine_type::self& self, std::string uri, LLSD credentials) { LL_INFOS("LLLogin") << "Entering coroutine " << LLCoros::instance().getName(self) << LL_ENDL; // Arriving in SRVRequest state |