diff options
author | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-11-12 19:29:05 +0200 |
---|---|---|
committer | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-11-12 19:29:05 +0200 |
commit | d149b28173c2b255bd1bf1db902368dfbdf3064a (patch) | |
tree | d433c57f07aad0959519f8b88ccd1ed8447af7bf /indra/newview/llmediadataclient.cpp | |
parent | 38115eb90b1760025ee299a167f6a9a2311f59ab (diff) | |
parent | 3b7ed8a4e9fdff83f89b49760d281ee5c13c8155 (diff) |
Merge
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llmediadataclient.cpp')
-rwxr-xr-x | indra/newview/llmediadataclient.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp index 512104a2f4..986c14acff 100755 --- a/indra/newview/llmediadataclient.cpp +++ b/indra/newview/llmediadataclient.cpp @@ -324,6 +324,22 @@ std::ostream& operator<<(std::ostream &s, const LLMediaDataClient::PriorityQueue return s; } +// find the given object in the queue. +bool LLMediaDataClient::PriorityQueue::find(const LLMediaDataClientObject::ptr_t &obj) const +{ + std::vector<LLMediaDataClient::request_ptr_t>::const_iterator iter = c.begin(); + std::vector<LLMediaDataClient::request_ptr_t>::const_iterator end = c.end(); + while (iter < end) + { + if (obj->getID() == (*iter)->getObject()->getID()) + { + return true; + } + iter++; + } + return false; +} + ////////////////////////////////////////////////////////////////////////////////////// // // LLMediaDataClient::QueueTimer @@ -491,6 +507,11 @@ bool LLMediaDataClient::isEmpty() const return (NULL == pRequestQueue) ? true : pRequestQueue->empty(); } +bool LLMediaDataClient::isInQueue(const LLMediaDataClientObject::ptr_t &object) const +{ + return (NULL == pRequestQueue) ? false : pRequestQueue->find(object); +} + ////////////////////////////////////////////////////////////////////////////////////// // // LLObjectMediaDataClient |