diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-07-17 15:14:14 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-07-17 15:14:14 +0100 |
| commit | eaac013b4e68dea48fb2c3070b7c7ca59dfd1b96 (patch) | |
| tree | 782b6af4e27104273afb7713c66c9e1d1dbd2fb4 /src/util.cc | |
| parent | aa1ea57fbbfe775168dacceb707a1dc80dc02dae (diff) | |
Hack asdcplib to make its RNG repeatable when we are testing.
Diffstat (limited to 'src/util.cc')
| -rw-r--r-- | src/util.cc | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/src/util.cc b/src/util.cc index aab2e184..e805f3eb 100644 --- a/src/util.cc +++ b/src/util.cc @@ -28,8 +28,6 @@ using namespace std; -bool libdcp::libdcp_test = false; - /** Create a UUID. * @return UUID. */ @@ -38,20 +36,7 @@ libdcp::make_uuid () { char buffer[64]; Kumu::UUID id; - - if (libdcp_test) { - static int N = 0; - byte_t t[16]; - for (int i = 0; i < 16; ++i) { - t[i] = N; - } - ++N; - - id = Kumu::UUID (t); - } else { - Kumu::GenRandomValue (id); - } - + Kumu::GenRandomValue (id); id.EncodeHex (buffer, 64); return string (buffer); } |
