mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-15 23:55:03 +03:00
Enables random number generation
This commit is contained in:
parent
4726912ec8
commit
3ebc2d61fb
@ -27,14 +27,11 @@ namespace utils {
|
|||||||
|
|
||||||
|
|
||||||
double random_number(const double from, const double to) {
|
double random_number(const double from, const double to) {
|
||||||
#if 0
|
|
||||||
std::random_device rd;
|
std::random_device rd;
|
||||||
std::mt19937 mt(rd());
|
std::mt19937 mt(rd());
|
||||||
return std::bind(
|
return std::bind(
|
||||||
std::uniform_real_distribution<>{from, to},
|
std::uniform_real_distribution<>{from, to},
|
||||||
std::default_random_engine{ mt() })();
|
std::default_random_engine{ mt() })();
|
||||||
#endif
|
|
||||||
return from+1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user