Fix list insert

This commit is contained in:
Atlante45 2015-08-03 13:34:40 -07:00
parent efb04fac21
commit f2b6db584a

View file

@ -100,7 +100,7 @@ bool LossList::remove(SequenceNumber seq) {
} else { } else {
auto temp = it->second; auto temp = it->second;
it->second = seq - 1; it->second = seq - 1;
_lossList.insert(it, make_pair(seq + 1, temp)); it = _lossList.insert(++it, make_pair(seq + 1, temp));
} }
_length -= 1; _length -= 1;
@ -150,7 +150,7 @@ void LossList::remove(SequenceNumber start, SequenceNumber end) {
_length -= seqlen(start, end); _length -= seqlen(start, end);
auto temp = it->second; auto temp = it->second;
it->second = start - 1; it->second = start - 1;
_lossList.insert(it, make_pair(end + 1, temp)); _lossList.insert(++it, make_pair(end + 1, temp));
} }
} }
} }