From d89f783377f26c3c97b4a167ccfa758b8fbc9217 Mon Sep 17 00:00:00 2001 From: khizmax Date: Wed, 13 May 2015 00:12:49 +0300 Subject: [PATCH] Simplified random_shuffle_permutation implementation --- cds/opt/permutation.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cds/opt/permutation.h b/cds/opt/permutation.h index 595522e6..dbf138c7 100644 --- a/cds/opt/permutation.h +++ b/cds/opt/permutation.h @@ -205,14 +205,13 @@ namespace cds { namespace opt { integer_type * m_pLast; random_generator m_RandomGenerator; - random_device m_RandomDevice; //@endcond public: /// Initializes the generator of arbitrary length \p nLength random_shuffle_permutation( size_t nLength ) : m_pCur( nullptr ) - , m_RandomGenerator( m_RandomDevice() ) + , m_RandomGenerator( random_device()() ) { m_pFirst = new integer_type[nLength]; m_pLast = m_pFirst + nLength; -- 2.34.1