mirror of
https://github.com/minetest/minetest.git
synced 2024-12-24 15:12:23 +01:00
Remove unused function in ReliablePacketBuffer
This commit is contained in:
parent
428a4c86e3
commit
13b22e2afb
@ -182,19 +182,12 @@ u32 ReliablePacketBuffer::size()
|
|||||||
return m_list.size();
|
return m_list.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ReliablePacketBuffer::containsPacket(u16 seqnum)
|
|
||||||
{
|
|
||||||
return !(findPacket(seqnum) == m_list.end());
|
|
||||||
}
|
|
||||||
|
|
||||||
RPBSearchResult ReliablePacketBuffer::findPacket(u16 seqnum)
|
RPBSearchResult ReliablePacketBuffer::findPacket(u16 seqnum)
|
||||||
{
|
{
|
||||||
std::list<BufferedPacket>::iterator i = m_list.begin();
|
std::list<BufferedPacket>::iterator i = m_list.begin();
|
||||||
for(; i != m_list.end(); ++i)
|
for(; i != m_list.end(); ++i)
|
||||||
{
|
{
|
||||||
u16 s = readU16(&(i->data[BASE_HEADER_SIZE+1]));
|
u16 s = readU16(&(i->data[BASE_HEADER_SIZE+1]));
|
||||||
/*dout_con<<"findPacket(): finding seqnum="<<seqnum
|
|
||||||
<<", comparing to s="<<s<<std::endl;*/
|
|
||||||
if (s == seqnum)
|
if (s == seqnum)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -252,13 +252,12 @@ public:
|
|||||||
|
|
||||||
void print();
|
void print();
|
||||||
bool empty();
|
bool empty();
|
||||||
bool containsPacket(u16 seqnum);
|
|
||||||
RPBSearchResult notFound();
|
RPBSearchResult notFound();
|
||||||
u32 size();
|
u32 size();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RPBSearchResult findPacket(u16 seqnum);
|
RPBSearchResult findPacket(u16 seqnum); // does not perform locking
|
||||||
|
|
||||||
std::list<BufferedPacket> m_list;
|
std::list<BufferedPacket> m_list;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user