summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/bits/random.tcc
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-06 14:50:06 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-06 14:50:06 +0000
commit9f5f984d69072babd8d66302e6595d8c081587b0 (patch)
tree8c8beddd312e53555e1a9318e6377fa67f902660 /libstdc++-v3/include/bits/random.tcc
parent0fefde02a19bf2769eba47faf59dae78dc982b77 (diff)
downloadgcc-9f5f984d69072babd8d66302e6595d8c081587b0.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145605 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/bits/random.tcc')
-rw-r--r--libstdc++-v3/include/bits/random.tcc4
1 files changed, 2 insertions, 2 deletions
diff --git a/libstdc++-v3/include/bits/random.tcc b/libstdc++-v3/include/bits/random.tcc
index b6a25434bf3..ee2b71c6f33 100644
--- a/libstdc++-v3/include/bits/random.tcc
+++ b/libstdc++-v3/include/bits/random.tcc
@@ -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;