init RNG for everybody using time()

svn-id: r10796
This commit is contained in:
Max Horn 2003-10-14 10:24:27 +00:00
parent e9dacde3c5
commit 0aa58f53c8
3 changed files with 5 additions and 6 deletions

View file

@ -75,8 +75,10 @@ void hexdump(const byte * data, int len, int bytesPerLine) {
printf("|\n");
}
RandomSource::RandomSource(uint32 seed) {
_randSeed = seed;
RandomSource::RandomSource() {
// Use system time as RNG seed. Normally not a good idea, if you are using
// a RNG for security purposes, but good enough for our purposes.
setSeed(time(0));
}
void RandomSource::setSeed(uint32 seed) {