File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -36,13 +36,14 @@ struct DataAccess {
3636} // namespace o2::test
3737BOOST_AUTO_TEST_CASE (test_flattenrestore)
3838{
39- o2::test::DataAccess access{static_cast <size_t >(rand () % 32 )};
39+ unsigned int seed = 1 ;
40+ o2::test::DataAccess access{static_cast <size_t >(rand_r (&seed) % 32 )};
4041 std::vector<char > chars (access.count );
41- std::generate (chars.begin (), chars.end (), []() { return rand ( ) % 256 ; });
42+ std::generate (chars.begin (), chars.end (), [&seed ]() { return rand_r (&seed ) % 256 ; });
4243 std::vector<int > ints (access.count );
43- std::generate (ints.begin (), ints.end (), []() { return rand ( ) % 256 ; });
44+ std::generate (ints.begin (), ints.end (), [&seed ]() { return rand_r (&seed ) % 256 ; });
4445 std::vector<float > floats (access.count );
45- std::generate (floats.begin (), floats.end (), []() { return rand ( ) % 256 ; });
46+ std::generate (floats.begin (), floats.end (), [&seed ]() { return rand_r (&seed ) % 256 ; });
4647 access.chars = chars.data ();
4748 access.ints = ints.data ();
4849 access.floats = floats.data ();
You can’t perform that action at this time.
0 commit comments