mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 00:47:39 +02:00
Fix std::find_if
This commit is contained in:
parent
8f54cd6f7e
commit
ca342fb3b4
1 changed files with 6 additions and 6 deletions
|
@ -466,8 +466,8 @@ void Connection::processACK2(std::unique_ptr<ControlPacket> controlPacket) {
|
||||||
controlPacket->readPrimitive(&subSequenceNumber);
|
controlPacket->readPrimitive(&subSequenceNumber);
|
||||||
|
|
||||||
// check if we had that subsequence number in our map
|
// check if we had that subsequence number in our map
|
||||||
auto it = std::find_if(_sentACKs.begin(), _sentACKs.end(), [subSequenceNumber](const ACKListPair& pair){
|
auto it = std::find_if_not(_sentACKs.begin(), _sentACKs.end(), [&subSequenceNumber](const ACKListPair& pair){
|
||||||
return subSequenceNumber >= pair.first;
|
return pair.first < subSequenceNumber;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (it != _sentACKs.end()) {
|
if (it != _sentACKs.end()) {
|
||||||
|
@ -487,14 +487,14 @@ void Connection::processACK2(std::unique_ptr<ControlPacket> controlPacket) {
|
||||||
if (it->second.first > _lastReceivedAcknowledgedACK) {
|
if (it->second.first > _lastReceivedAcknowledgedACK) {
|
||||||
_lastReceivedAcknowledgedACK = it->second.first;
|
_lastReceivedAcknowledgedACK = it->second.first;
|
||||||
}
|
}
|
||||||
|
} else if (it->first < subSequenceNumber) {
|
||||||
// erase this sub-sequence number and anything below it now that we've gotten our timing information
|
|
||||||
_sentACKs.erase(_sentACKs.begin(), it);
|
|
||||||
} else {
|
|
||||||
Q_UNREACHABLE();
|
Q_UNREACHABLE();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// erase this sub-sequence number and anything below it now that we've gotten our timing information
|
||||||
|
_sentACKs.erase(_sentACKs.begin(), it);
|
||||||
|
|
||||||
_stats.recordReceivedACK2();
|
_stats.recordReceivedACK2();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue