mirror of
https://github.com/overte-org/overte.git
synced 2025-04-29 21:42:42 +02:00
Remove seqcmp
This commit is contained in:
parent
8b71462dc1
commit
b25d860be4
3 changed files with 1 additions and 8 deletions
|
@ -106,7 +106,7 @@ void UdtCC::onLoss(const std::vector<SeqNum>& losslist) {
|
||||||
|
|
||||||
_loss = true;
|
_loss = true;
|
||||||
|
|
||||||
if (seqcmp(losslist[0], _lastDecSeq) > 0) {
|
if (losslist[0] > _lastDecSeq) {
|
||||||
_lastDecPeriod = _packetSendPeriod;
|
_lastDecPeriod = _packetSendPeriod;
|
||||||
_packetSendPeriod = ceil(_packetSendPeriod * 1.125);
|
_packetSendPeriod = ceil(_packetSendPeriod * 1.125);
|
||||||
|
|
||||||
|
|
|
@ -11,11 +11,6 @@
|
||||||
|
|
||||||
#include "SeqNum.h"
|
#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) {
|
int udt::seqlen(const SeqNum& seq1, const SeqNum& seq2) {
|
||||||
return (seq1._value <= seq2._value) ? (seq2._value - seq1._value + 1)
|
return (seq1._value <= seq2._value) ? (seq2._value - seq1._value + 1)
|
||||||
: (seq2._value - seq1._value + SeqNum::MAX + 2);
|
: (seq2._value - seq1._value + SeqNum::MAX + 2);
|
||||||
|
|
|
@ -84,7 +84,6 @@ public:
|
||||||
friend SeqNum operator-(const SeqNum a, const Type& b);
|
friend SeqNum operator-(const SeqNum a, const Type& b);
|
||||||
friend SeqNum operator-(const Type& a, const SeqNum 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 seqlen(const SeqNum& seq1, const SeqNum& seq2);
|
||||||
friend int seqoff(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;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
int seqcmp(const SeqNum& seq1, const SeqNum& seq2);
|
|
||||||
int seqlen(const SeqNum& seq1, const SeqNum& seq2);
|
int seqlen(const SeqNum& seq1, const SeqNum& seq2);
|
||||||
int seqoff(const SeqNum& seq1, const SeqNum& seq2);
|
int seqoff(const SeqNum& seq1, const SeqNum& seq2);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue