mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-21 10:05:32 +00:00
AK: Don't use <random> on windows for ::rand()
This is the same as the libc function, just use the libc function.
This commit is contained in:
parent
06816deb78
commit
4aa70a07ca
|
@ -22,8 +22,7 @@
|
|||
#endif
|
||||
|
||||
#if defined(AK_OS_WINDOWS)
|
||||
# include <random>
|
||||
# include <unistd.h>
|
||||
# include <stdlib.h>
|
||||
#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<char*>(buffer);
|
||||
for (size_t i = 0; i < length; i++) {
|
||||
char_buffer[i] = std::rand();
|
||||
char_buffer[i] = rand();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue