Slightly tone down warning message about value-type RNGs and Random{Cover, Sample}.

This commit is contained in:
Joseph Rushton Wakeling 2013-08-26 09:49:50 +02:00
parent 98a3efb621
commit 3bdda604a8

View file

@ -1590,7 +1590,7 @@ foreach (e; randomCover(a, Random(unpredictableSeed))) // correct!
writeln(e);
}
foreach (e; randomCover(a, rndGen)) // WRONG!! rndGen gets copied by value
foreach (e; randomCover(a, rndGen)) // DANGEROUS!! rndGen gets copied by value
{
writeln(e);
}
@ -1808,8 +1808,8 @@ foreach (e; randomSample(a, 5, Random(unpredictableSeed))) // correct!
writeln(e);
}
foreach (e; randomSample(a, 5, rndGen)) // WRONG!! rndGen gets copied
{ // by value
foreach (e; randomSample(a, 5, rndGen)) // DANGEROUS!! rndGen gets
{ // copied by value
writeln(e);
}