"err, fixed crash?" -Elour

This commit is contained in:
John
2021-09-28 00:23:23 -04:00
committed by GitHub
parent 57cad7faf2
commit c632be49e2
+11 -8
View File
@@ -34,14 +34,17 @@ public:
void Tick() {
udpManager_->GiveTime();
auto remove_iter
= std::remove_if(std::begin(clients_), std::end(clients_), [](auto& client) {
return client->GetConnection()->GetStatus() == UdpConnection::cStatusDisconnected;
});
if (remove_iter != std::end(clients_))
clients_.erase(remove_iter);
// ??????
// not sure what this is or why its here but no bueno
//
//auto remove_iter
// = std::remove_if(std::begin(clients_), std::end(clients_), [](auto& client) {
// return client->GetConnection()->GetStatus() == UdpConnection::cStatusDisconnected;
// });
//
//if (remove_iter != std::end(clients_))
// clients_.erase(remove_iter);
OnTick();
}