1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 00:57:45 +00:00

Userland: Migrate from arc4random_uniform() to get_random_uniform()

This commit is contained in:
Jean-Baptiste Boric 2021-05-14 17:17:26 +02:00 committed by Andreas Kling
parent 069bf988ed
commit 5a0468c21f
5 changed files with 11 additions and 6 deletions

View file

@ -9,6 +9,7 @@
#include <AK/JsonObject.h>
#include <AK/JsonValue.h>
#include <AK/Optional.h>
#include <AK/Random.h>
#include <AK/Vector.h>
#include <LibCore/ArgsParser.h>
#include <LibCore/DateTime.h>
@ -115,7 +116,7 @@ int main(int argc, char** argv)
return 1;
}
u32 i = arc4random_uniform(quotes.size());
u32 i = get_random_uniform(quotes.size());
const auto& chosen_quote = quotes[i];
auto datetime = Core::DateTime::from_timestamp(chosen_quote.utc_time());