Fixed bugs in request sorting (HC_QUIT request with highest
priority did not get sorted to be the next request to be executed). git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9697 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -586,7 +586,7 @@ void NetworkHttp::insertRequest(Request *request)
|
||||
{
|
||||
m_all_requests.getData().push_back(request);
|
||||
unsigned int i=m_all_requests.getData().size()-1;
|
||||
while(i>0 && *(m_all_requests.getData()[i])<*request)
|
||||
while(i>0 && *(m_all_requests.getData()[i-1])<*request)
|
||||
{
|
||||
m_all_requests.getData()[i] = m_all_requests.getData()[i-1];
|
||||
i--;
|
||||
|
||||
@@ -93,7 +93,7 @@ public:
|
||||
void setProgress(float f) { m_progress.setAtomic(f); }
|
||||
// --------------------------------------------------------------------
|
||||
/** Used in sorting requests by priority. */
|
||||
bool operator<(const Request &r) { return r.m_priority < m_priority;}
|
||||
bool operator<(const Request &r) { return m_priority < r.m_priority;}
|
||||
// --------------------------------------------------------------------
|
||||
/** Signals that this request should be cancelled. */
|
||||
void cancel() { m_cancel = true; }
|
||||
|
||||
Reference in New Issue
Block a user