diff options
Diffstat (limited to 'boost/random/subtract_with_carry.hpp')
-rw-r--r-- | boost/random/subtract_with_carry.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/boost/random/subtract_with_carry.hpp b/boost/random/subtract_with_carry.hpp index 298eb33475..dc430e6d55 100644 --- a/boost/random/subtract_with_carry.hpp +++ b/boost/random/subtract_with_carry.hpp @@ -7,7 +7,7 @@ * * See http://www.boost.org for most recent version including documentation. * - * $Id: subtract_with_carry.hpp 72951 2011-07-07 04:57:37Z steven_watanabe $ + * $Id$ * * Revision history * 2002-03-02 created @@ -161,7 +161,7 @@ public: IntType, value) { typedef linear_congruential_engine<uint32_t,40014,0,2147483563> gen_t; - gen_t intgen(static_cast<boost::uint32_t>(value)); + gen_t intgen(static_cast<boost::uint32_t>(value == 0 ? default_seed : value)); detail::generator_seed_seq<gen_t> gen(intgen); seed(gen); } @@ -354,7 +354,7 @@ public: boost::uint32_t, value) { init_modulus(); seed(value); } /** - * Creates a new \subtract_with_carry_01_engine and seeds with with values + * Creates a new \subtract_with_carry_01_engine and seeds with values * produced by seq.generate(). */ BOOST_RANDOM_DETAIL_SEED_SEQ_CONSTRUCTOR(subtract_with_carry_01_engine, @@ -392,7 +392,7 @@ public: boost::uint32_t, value) { typedef linear_congruential_engine<uint32_t, 40014, 0, 2147483563> gen_t; - gen_t intgen(value); + gen_t intgen(value == 0 ? default_seed : value); detail::generator_seed_seq<gen_t> gen(intgen); seed(gen); } |