diff options
Diffstat (limited to 'Swiften/Base/BoostRandomGenerator.cpp')
-rw-r--r-- | Swiften/Base/BoostRandomGenerator.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Swiften/Base/BoostRandomGenerator.cpp b/Swiften/Base/BoostRandomGenerator.cpp index 62c3055..e58ec95 100644 --- a/Swiften/Base/BoostRandomGenerator.cpp +++ b/Swiften/Base/BoostRandomGenerator.cpp @@ -12,6 +12,11 @@ namespace Swift { +BoostRandomGenerator::BoostRandomGenerator() { + // FIXME: Not a good seed + generator.seed(static_cast<unsigned int>(std::time(0))); +} + int BoostRandomGenerator::generateRandomInteger(int maximum) { boost::uniform_int<> distribution(0, maximum); return distribution(generator); |