aboutsummaryrefslogtreecommitdiff
path: root/test/src/unit/AssetTests.cpp
diff options
context:
space:
mode:
authorBryan Galdrikian <[email protected]>2019-05-03 00:25:46 -0700
committerBryan Galdrikian <[email protected]>2019-05-03 00:25:46 -0700
commit74b64a27f8e07b1b0b47b809b1a060518fa11a97 (patch)
tree34cca01711be56892c149706f02ba7358d87ec54 /test/src/unit/AssetTests.cpp
parentFixing chunk reorder bug in BlastTool, when importing a prefractured mesh (diff)
downloadblast-1.1.5_pre1.tar.xz
blast-1.1.5_pre1.zip
Blast SDK 1.1.5 prerelease #1v1.1.5_pre1
Diffstat (limited to 'test/src/unit/AssetTests.cpp')
-rwxr-xr-xtest/src/unit/AssetTests.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/src/unit/AssetTests.cpp b/test/src/unit/AssetTests.cpp
index 6511f60..58ea7d1 100755
--- a/test/src/unit/AssetTests.cpp
+++ b/test/src/unit/AssetTests.cpp
@@ -33,6 +33,7 @@
#include "NvBlastTkFramework.h"
+#include <random>
#include <algorithm>
@@ -301,13 +302,16 @@ public:
// An array into which to copy the reordered descs
std::vector<NvBlastChunkDesc> shuffledChunkDescs(chunkDescCount);
+ std::random_device rd;
+ std::mt19937 g(rd());
+
std::vector<char> scratch;
const uint32_t trials = 30;
uint32_t attempt = 0;
while(1)
{
// Shuffle the reorder array
- std::random_shuffle(shuffledOrder.begin(), shuffledOrder.end());
+ std::shuffle(shuffledOrder.begin(), shuffledOrder.end(), g);
// Save initial bonds
std::vector<NvBlastBondDesc> savedBondDescs(bondDescs, bondDescs + bondDescCount);