mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-05 01:30:23 +02:00
replaced UINT16_MAX with std::numeric_limits<uint16_t>::max
This commit is contained in:
parent
b63c88f42c
commit
54f32d331e
1 changed files with 3 additions and 2 deletions
|
@ -8,6 +8,7 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
#include <limits>
|
||||
#include "SentPacketHistory.h"
|
||||
#include <qdebug.h>
|
||||
|
||||
|
@ -15,7 +16,7 @@ SentPacketHistory::SentPacketHistory(int size)
|
|||
: _sentPackets(size),
|
||||
_newestPacketAt(0),
|
||||
_numExistingPackets(0),
|
||||
_newestSequenceNumber(UINT16_MAX)
|
||||
_newestSequenceNumber(std::numeric_limits<uint16_t>::max())
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -42,7 +43,7 @@ void SentPacketHistory::packetSent(uint16_t sequenceNumber, const QByteArray& pa
|
|||
|
||||
const QByteArray* SentPacketHistory::getPacket(uint16_t sequenceNumber) const {
|
||||
|
||||
const int UINT16_RANGE = UINT16_MAX + 1;
|
||||
const int UINT16_RANGE = std::numeric_limits<uint16_t>::max() + 1;
|
||||
|
||||
// if sequenceNumber > _newestSequenceNumber, assume sequenceNumber is from before the most recent rollover
|
||||
// correct the diff so that it correctly represents how far back in the history sequenceNumber is
|
||||
|
|
Loading…
Reference in a new issue