From: khizmax Date: Tue, 12 May 2015 21:12:49 +0000 (+0300) Subject: Simplified random_shuffle_permutation implementation X-Git-Tag: v2.1.0~242 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d89f783377f26c3c97b4a167ccfa758b8fbc9217;p=libcds.git Simplified random_shuffle_permutation implementation --- 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;