erratum III

This commit is contained in:
Marc-Éric Martel 2023-10-26 10:55:36 -04:00
parent 8e95899192
commit 397cf7f00d

View File

@ -99,7 +99,6 @@ int Server::Ready() {
return 1; return 1;
} }
srand(time(NULL));
buildIdList(ID_LIST_SIZE); buildIdList(ID_LIST_SIZE);
Log("À l'écoute sur le port: " + std::to_string(SRV_PORT), false, false); Log("À l'écoute sur le port: " + std::to_string(SRV_PORT), false, false);
@ -240,6 +239,7 @@ void Server::Log(std::string str, bool is_error = false, bool is_fatal = false)
void Server::buildIdList(size_t size) { void Server::buildIdList(size_t size) {
std::set<uint64_t> lst; std::set<uint64_t> lst;
srand(time(NULL));
do lst.insert(((uint64_t)rand() << 32 | rand())); // EIGHT SIX SEVENFIVE THREE AUGHT NIIIIIIiIIiiIiINE! do lst.insert(((uint64_t)rand() << 32 | rand())); // EIGHT SIX SEVENFIVE THREE AUGHT NIIIIIIiIIiiIiINE!
while (lst.size() < size); while (lst.size() < size);