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:
hikerstk
2011-09-01 01:58:27 +00:00
parent 2ea50e99fd
commit 5f04084976
2 changed files with 2 additions and 2 deletions

View File

@@ -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--;

View File

@@ -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; }