
Module: ppl/ppl Branch: master Commit: 364dfbeafba14774884ce7d84373785d01f43d46 URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=364dfbeafba14...
Author: Roberto Bagnara bagnara@cs.unipr.it Date: Tue Aug 21 21:05:46 2012 +0200
Avoided a couple of "magic constants". Detected by ECLAIR service nomagicc.
---
src/Float_inlines.hh | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Float_inlines.hh b/src/Float_inlines.hh index 9c0f735..50670de 100644 --- a/src/Float_inlines.hh +++ b/src/Float_inlines.hh @@ -371,7 +371,7 @@ inline void float_intel_double_extended::build(bool negative, mpz_t mantissa, int exponent) { #if ULONG_MAX == 0xffffffffUL - mpz_export(&lsp, 0, -1, 8, 0, 0, mantissa); + mpz_export(&lsp, 0, -1, sizeof(lsp), 0, 0, mantissa); #else lsp = mpz_get_ui(mantissa); #endif @@ -450,7 +450,7 @@ float_ieee754_quad::set_max(bool negative) { inline void float_ieee754_quad::build(bool negative, mpz_t mantissa, int exponent) { uint64_t parts[2]; - mpz_export(parts, 0, -1, 8, 0, 0, mantissa); + mpz_export(parts, 0, -1, sizeof(parts[0]), 0, 0, mantissa); lsp = parts[0]; msp = parts[1]; msp &= ((static_cast<uint64_t>(1) << (MANTISSA_BITS - 64)) - 1);