]> gcc.gnu.org Git - gcc.git/commitdiff
random.tcc (linear_congruential_engine<>:: seed(seed_seq&)): Fix typo in last fix...
authorPaolo Carlini <paolo.carlini@oracle.com>
Mon, 6 Apr 2009 14:50:06 +0000 (14:50 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Mon, 6 Apr 2009 14:50:06 +0000 (14:50 +0000)
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

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/random.tcc

index 62c741154ba0b3621c26669e79e4c258b9a05179..d2b1cd656c596049014686f27a71562788b2b857 100644 (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.
index b6a25434bf306ac9acdef7c0d4baec30405de2db..ee2b71c6f3327a28188377754a43ea7b5366e3ac 100644 (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;
This page took 0.073677 seconds and 5 git commands to generate.