Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r62545 - trunk/boost/random
From: steven_at_[hidden]
Date: 2010-06-07 23:21:29


Author: steven_watanabe
Date: 2010-06-07 23:21:28 EDT (Mon, 07 Jun 2010)
New Revision: 62545
URL: http://svn.boost.org/trac/boost/changeset/62545

Log:
Make sure that all members are initialized. Fixes #4085
Text files modified:
   trunk/boost/random/normal_distribution.hpp | 6 ++++--
   1 files changed, 4 insertions(+), 2 deletions(-)

Modified: trunk/boost/random/normal_distribution.hpp
==============================================================================
--- trunk/boost/random/normal_distribution.hpp (original)
+++ trunk/boost/random/normal_distribution.hpp 2010-06-07 23:21:28 EDT (Mon, 07 Jun 2010)
@@ -52,14 +52,16 @@
    */
   explicit normal_distribution(const result_type& mean_arg = result_type(0),
                                const result_type& sigma_arg = result_type(1))
- : _mean(mean_arg), _sigma(sigma_arg), _valid(false)
+ : _mean(mean_arg), _sigma(sigma_arg),
+ _r1(0), _r2(0), _cached_rho(0), _valid(false)
   {
     assert(_sigma >= result_type(0));
   }
 
   // compiler-generated copy constructor is NOT fine, need to purge cache
   normal_distribution(const normal_distribution& other)
- : _mean(other._mean), _sigma(other._sigma), _valid(false)
+ : _mean(other._mean), _sigma(other._sigma),
+ _r1(0), _r2(0), _cached_rho(0), _valid(false)
   {
   }
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk