aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2019-08-15 20:47:32 +0200
committersfan5 <sfan5@live.de>2019-08-16 20:03:53 +0200
commit13b22e2afb57eb2da0513f2caca4e88549f55d0a (patch)
treea89fa7589cec4948a2aead6f0eb796beed5391aa /src
parent428a4c86e3c5bdb93bc8ba152e90c759b4f6d504 (diff)
downloadminetest-13b22e2afb57eb2da0513f2caca4e88549f55d0a.tar.gz
minetest-13b22e2afb57eb2da0513f2caca4e88549f55d0a.tar.bz2
minetest-13b22e2afb57eb2da0513f2caca4e88549f55d0a.zip
Remove unused function in ReliablePacketBuffer
Diffstat (limited to 'src')
-rw-r--r--src/network/connection.cpp7
-rw-r--r--src/network/connection.h3
2 files changed, 1 insertions, 9 deletions
diff --git a/src/network/connection.cpp b/src/network/connection.cpp
index 8eb91d45e..0bc13a2f0 100644
--- a/src/network/connection.cpp
+++ b/src/network/connection.cpp
@@ -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;
}
diff --git a/src/network/connection.h b/src/network/connection.h
index 5b1902deb..057bd39f6 100644
--- a/src/network/connection.h
+++ b/src/network/connection.h
@@ -252,13 +252,12 @@ public:
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;