diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2011-03-14 16:40:29 +0100 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2011-03-14 16:40:29 +0100 |
commit | 0190e315a34377c658fa3acb5c658a6b4a52ae1e (patch) | |
tree | c580a0e675e8b0a800d0c497a1829537d65803b7 /methods | |
parent | 97b65b1041ad684a6dafb601a0926dcd98b5d6a0 (diff) |
methods/mirror.cc: init random seed at startup
Diffstat (limited to 'methods')
-rw-r--r-- | methods/mirror.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/methods/mirror.cc b/methods/mirror.cc index 08a603207..ed42cdbfb 100644 --- a/methods/mirror.cc +++ b/methods/mirror.cc @@ -157,7 +157,7 @@ bool MirrorMethod::RandomizeMirrorFile(string mirror_file) // read ifstream in(mirror_file.c_str()); - while ( ! in.eof() ) { + while ( !in.eof() ) { getline(in, line); content.push_back(line); } @@ -403,6 +403,8 @@ int main() { setlocale(LC_ALL, ""); + srand ( time(NULL) ); + MirrorMethod Mth; return Mth.Loop(); |