Commit 1ae3576f by Paolo Carlini Committed by Paolo Carlini

random.tcc (linear_congruential_engine<>:: seed(seed_seq&)): Fix typo in last fix for __m == 0.

2009-04-06  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/random.tcc (linear_congruential_engine<>::
	seed(seed_seq&)): Fix typo in last fix for __m == 0.

From-SVN: r145605
parent 4bad83f5
2009-04-06 Paolo Carlini <paolo.carlini@oracle.com> 2009-04-06 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/random.tcc (linear_congruential_engine<>::
seed(seed_seq&)): Fix typo in last fix for __m == 0.
2009-04-06 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/random.h (operator==): Mark all inline. * include/bits/random.h (operator==): Mark all inline.
(mersenne_twister_engine): Enable #if 0 checks. (mersenne_twister_engine): Enable #if 0 checks.
......
...@@ -119,8 +119,8 @@ namespace std ...@@ -119,8 +119,8 @@ namespace std
seed(seed_seq& __q) seed(seed_seq& __q)
{ {
const _UIntType __k0 = __m == 0 ? std::numeric_limits<_UIntType>::digits const _UIntType __k0 = __m == 0 ? std::numeric_limits<_UIntType>::digits
: (std::__lg(__m) + 31); : std::__lg(__m);
const _UIntType __k = __k0 / 32; const _UIntType __k = (__k0 + 31) / 32;
_UIntType __arr[__k + 3]; _UIntType __arr[__k + 3];
__q.generate(__arr + 0, __arr + 3); __q.generate(__arr + 0, __arr + 3);
_UIntType __factor = 1U; _UIntType __factor = 1U;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment