diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2009-06-30 01:25:52 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2009-06-30 01:25:52 +0000 |
commit | 462ac91e72c6e88ae57bf6942e44a751f85e95b6 (patch) | |
tree | f8d0babd8b88f40720adbcaba23fdae88c81a85a | |
parent | ddaa348855fd1bb4b8e0847305f9cbe31ab9a62c (diff) | |
download | gcc-462ac91e72c6e88ae57bf6942e44a751f85e95b6.zip gcc-462ac91e72c6e88ae57bf6942e44a751f85e95b6.tar.gz gcc-462ac91e72c6e88ae57bf6942e44a751f85e95b6.tar.bz2 |
2009-06-29 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/random.tcc
(linear_congruential_engine<>::seed(seed_seq&)): Use uint_least32_t
as array type.
From-SVN: r149078
-rw-r--r-- | libstdc++-v3/ChangeLog | 6 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/random.tcc | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 6704b43..f123217 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,11 @@ 2009-06-29 Paolo Carlini <paolo.carlini@oracle.com> + * include/bits/random.tcc + (linear_congruential_engine<>::seed(seed_seq&)): Use uint_least32_t + as array type. + +2009-06-29 Paolo Carlini <paolo.carlini@oracle.com> + * include/bits/random.h (__mod(_Tp)): Use defaults. (struct _Mod): Adjust template parameters. (linear_congruential_engine<>::operator()()): Adjust. diff --git a/libstdc++-v3/include/bits/random.tcc b/libstdc++-v3/include/bits/random.tcc index c8b6590..e4c3961 100644 --- a/libstdc++-v3/include/bits/random.tcc +++ b/libstdc++-v3/include/bits/random.tcc @@ -116,7 +116,7 @@ namespace std const _UIntType __k0 = __m == 0 ? std::numeric_limits<_UIntType>::digits : std::__lg(__m); const _UIntType __k = (__k0 + 31) / 32; - _UIntType __arr[__k + 3]; + uint_least32_t __arr[__k + 3]; __q.generate(__arr + 0, __arr + __k + 3); _UIntType __factor = 1u; _UIntType __sum = 0u; |