Allow to pass a 'seed' to RKISS

This somewhat simplifies the code.

Suggested by Lucas Braesch.

No functional change.
This commit is contained in:
Marco Costalba
2012-12-31 11:57:49 +01:00
parent 009a0f88e0
commit 896420b166
2 changed files with 4 additions and 10 deletions

View File

@@ -348,11 +348,7 @@ namespace {
} // namespace
PolyglotBook::PolyglotBook() {
for (int i = Time::now() % 10000; i > 0; i--)
RKiss.rand<unsigned>(); // Make random number generation less deterministic
}
PolyglotBook::PolyglotBook() : RKiss(Time::now() % 10000) {}
PolyglotBook::~PolyglotBook() { if (is_open()) close(); }