diff options
author | Sadie Powell <sadie@witchery.services> | 2024-03-07 21:56:58 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-03-07 22:52:41 +0000 |
commit | 464e6b8010c11708bcbed7cf6b2d972977f0e286 (patch) | |
tree | 0adee0c876aee23acb1e16e2195df90500ff6e65 /include/anope.h | |
parent | 3272c1bbc65eaa29ba63e176ec76702c5b21d367 (diff) |
Use the C++11 random number generator instead of rand().
This is safer, faster, and doesn't require seeding.
Diffstat (limited to 'include/anope.h')
-rw-r--r-- | include/anope.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/anope.h b/include/anope.h index bafd862e7..000e74d1a 100644 --- a/include/anope.h +++ b/include/anope.h @@ -558,6 +558,9 @@ namespace Anope */ extern CoreExport Anope::string Random(size_t len); + /** Generate a random number. */ + extern CoreExport int RandomNumber(); + /** Calculates the levenshtein distance between two strings. * @param s1 The first string. * @param s2 The second string. |