Remove seqcmp

This commit is contained in:
Atlante45 2015-07-28 10:36:19 -07:00
parent 8b71462dc1
commit b25d860be4
3 changed files with 1 additions and 8 deletions

View file

@ -106,7 +106,7 @@ void UdtCC::onLoss(const std::vector<SeqNum>& losslist) {
_loss = true;
if (seqcmp(losslist[0], _lastDecSeq) > 0) {
if (losslist[0] > _lastDecSeq) {
_lastDecPeriod = _packetSendPeriod;
_packetSendPeriod = ceil(_packetSendPeriod * 1.125);

View file

@ -11,11 +11,6 @@
#include "SeqNum.h"
int udt::seqcmp(const SeqNum& seq1, const SeqNum& seq2) {
return (glm::abs(seq1._value - seq2._value) < SeqNum::THRESHOLD) ? (seq1._value - seq2._value)
: (seq2._value - seq1._value);
}
int udt::seqlen(const SeqNum& seq1, const SeqNum& seq2) {
return (seq1._value <= seq2._value) ? (seq2._value - seq1._value + 1)
: (seq2._value - seq1._value + SeqNum::MAX + 2);

View file

@ -84,7 +84,6 @@ public:
friend SeqNum operator-(const SeqNum a, const Type& b);
friend SeqNum operator-(const Type& a, const SeqNum b);
friend int seqcmp(const SeqNum& seq1, const SeqNum& seq2);
friend int seqlen(const SeqNum& seq1, const SeqNum& seq2);
friend int seqoff(const SeqNum& seq1, const SeqNum& seq2);
@ -132,7 +131,6 @@ inline SeqNum operator-(const SeqNum::Type& a, SeqNum b) {
return b;
}
int seqcmp(const SeqNum& seq1, const SeqNum& seq2);
int seqlen(const SeqNum& seq1, const SeqNum& seq2);
int seqoff(const SeqNum& seq1, const SeqNum& seq2);