merged connection_queue patch from RC_0_16

This commit is contained in:
Arvid Norberg 2012-12-10 08:46:14 +00:00
parent 27db5e3f49
commit 70740a0ecd
1 changed files with 8 additions and 11 deletions

View File

@ -80,18 +80,15 @@ namespace libtorrent
entry* e = 0; entry* e = 0;
switch (priority) if (priority <= 0)
{ {
case 0:
m_queue.push_back(entry()); m_queue.push_back(entry());
e = &m_queue.back(); e = &m_queue.back();
break; }
case 1: else // priority > 0
case 2: {
m_queue.push_front(entry()); m_queue.push_front(entry());
e = &m_queue.front(); e = &m_queue.front();
break;
default: return;
} }
e->priority = priority; e->priority = priority;