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
This commit is contained in:
Paolo Carlini 2009-04-06 14:50:06 +00:00 committed by Paolo Carlini
parent 4bad83f55a
commit 1ae3576fa4
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
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.

View File

@ -119,8 +119,8 @@ namespace std
seed(seed_seq& __q)
{
const _UIntType __k0 = __m == 0 ? std::numeric_limits<_UIntType>::digits
: (std::__lg(__m) + 31);
const _UIntType __k = __k0 / 32;
: std::__lg(__m);
const _UIntType __k = (__k0 + 31) / 32;
_UIntType __arr[__k + 3];
__q.generate(__arr + 0, __arr + 3);
_UIntType __factor = 1U;