From 4aa70a07ca51d42b18c73cbd07890052611b3fd3 Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Mon, 12 Dec 2022 18:10:53 +0330 Subject: [PATCH] AK: Don't use on windows for ::rand() This is the same as the libc function, just use the libc function. --- AK/Random.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/AK/Random.h b/AK/Random.h index aca1e2d2cb..e21905fe0a 100644 --- a/AK/Random.h +++ b/AK/Random.h @@ -22,8 +22,7 @@ #endif #if defined(AK_OS_WINDOWS) -# include -# include +# include #endif namespace AK { @@ -38,7 +37,7 @@ inline void fill_with_random([[maybe_unused]] void* buffer, [[maybe_unused]] siz #else char* char_buffer = static_cast(buffer); for (size_t i = 0; i < length; i++) { - char_buffer[i] = std::rand(); + char_buffer[i] = rand(); } #endif }