Safe iterator pointer.
This commit is contained in:
parent
8b932677f5
commit
55b8d2c5de
@ -330,13 +330,13 @@ namespace Components
|
||||
std::vector<int> missingPackets;
|
||||
for (int j = 0; j < i->maxParts; ++j)
|
||||
{
|
||||
if (!Download::HasReceivedPacket(&*i, j))
|
||||
if (!Download::HasReceivedPacket(&(*i), j))
|
||||
{
|
||||
missingPackets.push_back(j);
|
||||
}
|
||||
}
|
||||
|
||||
Download::RequestMissingPackets(&*i, missingPackets);
|
||||
Download::RequestMissingPackets(&(*i), missingPackets);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -354,10 +354,10 @@ namespace Components
|
||||
int packets = 0;
|
||||
for (int j = 0; j < i->maxParts && packets <= FRAME_PACKET_LIMIT && i->acknowledged; ++j)
|
||||
{
|
||||
if (!Download::HasSentPacket(&*i, j))
|
||||
if (!Download::HasSentPacket(&(*i), j))
|
||||
{
|
||||
//Logger::Print("Sending packet...\n");
|
||||
Download::SendPacket(&*i, j);
|
||||
Download::SendPacket(&(*i), j);
|
||||
packets++;
|
||||
}
|
||||
}
|
||||
|
@ -69,8 +69,7 @@ namespace Components
|
||||
{
|
||||
if (i->address == address)
|
||||
{
|
||||
// I don't know if that's safe, but we'll see that later...
|
||||
return &*i;
|
||||
return &(*i);
|
||||
}
|
||||
}
|
||||
|
||||
@ -82,8 +81,7 @@ namespace Components
|
||||
{
|
||||
if (i->address == address)
|
||||
{
|
||||
// I don't know if that's safe, but we'll see that later...
|
||||
return &*i;
|
||||
return &(*i);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user