Fix unpredictableSeed so that rndstuff can be used in @safe code

Allows:
1) canFind's tests to be @safe
2) allows the remainder of find's tests to be @safe
This commit is contained in:
Brad Roberts 2014-10-12 01:25:10 -07:00
parent 3200b08644
commit f70e1e41e4
2 changed files with 7 additions and 7 deletions

View file

@ -1114,7 +1114,7 @@ auto n = rnd.front;
----
*/
@property uint unpredictableSeed()
@property uint unpredictableSeed() @trusted
{
static bool seeded;
static MinstdRand0 rand;
@ -1128,7 +1128,7 @@ auto n = rnd.front;
return cast(uint) (TickDuration.currSystemTick.length ^ rand.front);
}
unittest
@safe unittest
{
// not much to test here
auto a = unpredictableSeed;