From 462ac91e72c6e88ae57bf6942e44a751f85e95b6 Mon Sep 17 00:00:00 2001 From: Paolo Carlini 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. From-SVN: r149078 --- 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