Skip to content

Commit

Permalink
Remove unused function in ReliablePacketBuffer
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 committed Aug 16, 2019
1 parent 428a4c8 commit 13b22e2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
7 changes: 0 additions & 7 deletions src/network/connection.cpp
Expand Up @@ -182,19 +182,12 @@ u32 ReliablePacketBuffer::size()
return m_list.size();
}

bool ReliablePacketBuffer::containsPacket(u16 seqnum)
{
return !(findPacket(seqnum) == m_list.end());
}

RPBSearchResult ReliablePacketBuffer::findPacket(u16 seqnum)
{
std::list<BufferedPacket>::iterator i = m_list.begin();
for(; i != m_list.end(); ++i)
{
u16 s = readU16(&(i->data[BASE_HEADER_SIZE+1]));
/*dout_con<<"findPacket(): finding seqnum="<<seqnum
<<", comparing to s="<<s<<std::endl;*/
if (s == seqnum)
break;
}
Expand Down
3 changes: 1 addition & 2 deletions src/network/connection.h
Expand Up @@ -252,13 +252,12 @@ class ReliablePacketBuffer

void print();
bool empty();
bool containsPacket(u16 seqnum);
RPBSearchResult notFound();
u32 size();


private:
RPBSearchResult findPacket(u16 seqnum);
RPBSearchResult findPacket(u16 seqnum); // does not perform locking

std::list<BufferedPacket> m_list;

Expand Down

0 comments on commit 13b22e2

Please sign in to comment.