Prevent passing of non-POD types to POD-only interfaces:

This tidies up the code that produces random numbers to conform
to programming best practices and reduce dependencies.

* Use std::random_device instead of platform-specific code
* Remove RandomNumbers class and use free functions instead
This commit is contained in:
Nik Bougalis
2014-12-18 22:40:32 -08:00
committed by Vinnie Falco
parent 60f27178b8
commit b328ec2462
9 changed files with 60 additions and 283 deletions

View File

@@ -218,11 +218,8 @@ int run (int argc, char** argv)
po::positional_options_description p;
p.add ("parameters", -1);
if (! RandomNumbers::getInstance ().initialize ())
{
std::cerr << "Unable to add system entropy" << std::endl;
iResult = 2;
}
// Seed the RNG early
add_entropy ();
if (!iResult)
{