Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r77128 - sandbox/big_number/boost/multiprecision
From: john_at_[hidden]
Date: 2012-02-27 12:10:46


Author: johnmaddock
Date: 2012-02-27 12:10:46 EST (Mon, 27 Feb 2012)
New Revision: 77128
URL: http://svn.boost.org/trac/boost/changeset/77128

Log:
Fix some multiple initializations of mpz_t.
Text files modified:
   sandbox/big_number/boost/multiprecision/gmp.hpp | 6 +++---
   1 files changed, 3 insertions(+), 3 deletions(-)

Modified: sandbox/big_number/boost/multiprecision/gmp.hpp
==============================================================================
--- sandbox/big_number/boost/multiprecision/gmp.hpp (original)
+++ sandbox/big_number/boost/multiprecision/gmp.hpp 2012-02-27 12:10:46 EST (Mon, 27 Feb 2012)
@@ -896,8 +896,8 @@
       unsigned long long mask = ((1uLL << std::numeric_limits<unsigned>::digits) - 1);
       unsigned shift = 0;
       mpz_t t;
- mpz_init(m_data);
- mpz_init(t);
+ mpz_set_ui(m_data, 0);
+ mpz_init_set_ui(t, 0);
       while(i)
       {
          mpz_set_ui(t, static_cast<unsigned>(i & mask));
@@ -955,7 +955,7 @@
 
       int e;
       long double f, term;
- mpz_init_set_ui(m_data, 0u);
+ mpz_set_ui(m_data, 0u);
 
       f = frexp(a, &e);
 


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