diff options
author | Monroe Linden <monroe@lindenlab.com> | 2010-08-09 16:39:06 -0700 |
---|---|---|
committer | Monroe Linden <monroe@lindenlab.com> | 2010-08-09 16:39:06 -0700 |
commit | 60b12a24d4a6061a3fe22a433cb8852002a8e857 (patch) | |
tree | 70c9958051df8f1c6efbe217b8c9c3cf46a0474e /indra | |
parent | 4db872e11ea5d322c20de9ddde484cb39690c1a2 (diff) |
Patch on a fix for the llmediadataclient.cpp unit test.
My refactor of LLMediaDataClient caused a crash in the windows unit test. Change set 92fd90bd795a fixed the crash, but broke the code in question. This changeset should make the code behave correctly, while removing some premature optimization that I now think didn't properly in the first place.
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/llmediadataclient.cpp | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp index ec185bc790..075f0ba3ec 100755 --- a/indra/newview/llmediadataclient.cpp +++ b/indra/newview/llmediadataclient.cpp @@ -263,18 +263,15 @@ void LLMediaDataClient::pushBack(request_ptr_t request) void LLMediaDataClient::trackRequest(request_ptr_t request) { - request_set_t::iterator iter = mUnQueuedRequests.lower_bound(request); + request_set_t::iterator iter = mUnQueuedRequests.find(request); - if (iter != mUnQueuedRequests.end()) + if(iter != mUnQueuedRequests.end()) { - if(*iter == request) - { - LL_WARNS("LLMediaDataClient") << "Tracking already tracked request: " << *request << LL_ENDL; - } - else - { - mUnQueuedRequests.insert(iter, request); - } + LL_WARNS("LLMediaDataClient") << "Tracking already tracked request: " << *request << LL_ENDL; + } + else + { + mUnQueuedRequests.insert(request); } } @@ -284,14 +281,11 @@ void LLMediaDataClient::stopTrackingRequest(request_ptr_t request) if (iter != mUnQueuedRequests.end()) { - if(*iter == request) - { - mUnQueuedRequests.erase(iter); - } - else - { - LL_WARNS("LLMediaDataClient") << "Removing an untracked request: " << *request << LL_ENDL; - } + mUnQueuedRequests.erase(iter); + } + else + { + LL_WARNS("LLMediaDataClient") << "Removing an untracked request: " << *request << LL_ENDL; } } |