From 2f815f5d6f56c73bb2d1b9ea4e93614432f4cfa5 Mon Sep 17 00:00:00 2001 From: paolo Date: Tue, 30 Jun 2009 01:25:52 +0000 Subject: [PATCH] 2009-06-29 Paolo Carlini * include/bits/random.tcc (linear_congruential_engine<>::seed(seed_seq&)): Use uint_least32_t as array type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149078 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/ChangeLog | 6 ++++++ libstdc++-v3/include/bits/random.tcc | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) 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 + * include/bits/random.tcc + (linear_congruential_engine<>::seed(seed_seq&)): Use uint_least32_t + as array type. + +2009-06-29 Paolo Carlini + * 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; -- 2.7.4