[PPL-devel] [GIT] ppl/ppl(master): Do not use C-style casts.

Roberto Bagnara bagnara at cs.unipr.it
Wed Aug 15 14:34:19 CEST 2012


Module: ppl/ppl
Branch: master
Commit: 93c41b7c1deca42ec41d5732042eb536352de3ac
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=93c41b7c1deca42ec41d5732042eb536352de3ac

Author: Roberto Bagnara <bagnara at cs.unipr.it>
Date:   Wed Aug 15 14:27:37 2012 +0200

Do not use C-style casts.
Detected by ECLAIR service castexpr.

---

 src/checked_float.inlines.hh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/checked_float.inlines.hh b/src/checked_float.inlines.hh
index 254e8c4..44ab5ee 100644
--- a/src/checked_float.inlines.hh
+++ b/src/checked_float.inlines.hh
@@ -1019,7 +1019,7 @@ assign_mpq_numeric_float(mpq_class& to, const long double from) {
     n *= mult;
     exp -= bits;
     long double intpart = std::floor(n);
-    num += (unsigned long)intpart;
+    num += static_cast<unsigned long>(intpart);
     n -= intpart;
     if (n == 0)
       break;




More information about the PPL-devel mailing list