From 13f83d5602b7836fa37bdb028994eff4ef48ebd9 Mon Sep 17 00:00:00 2001 From: Michael Tautschnig Date: Wed, 20 Jun 2018 10:25:42 +0000 Subject: [PATCH] Use to_ulong instead of the deprecated integer2ulong --- src/util/mp_arith.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/util/mp_arith.cpp b/src/util/mp_arith.cpp index 06143d775e7..798ae25de5c 100644 --- a/src/util/mp_arith.cpp +++ b/src/util/mp_arith.cpp @@ -195,14 +195,16 @@ mp_integer::ullong_t integer2ulong(const mp_integer &n) std::size_t integer2size_t(const mp_integer &n) { PRECONDITION(n>=0 && n<=std::numeric_limits::max()); - mp_integer::ullong_t ull=integer2ulong(n); + PRECONDITION(n.is_ulong()); + mp_integer::ullong_t ull = n.to_ulong(); return (std::size_t) ull; } unsigned integer2unsigned(const mp_integer &n) { PRECONDITION(n>=0 && n<=std::numeric_limits::max()); - mp_integer::ullong_t ull=integer2ulong(n); + PRECONDITION(n.is_ulong()); + mp_integer::ullong_t ull = n.to_ulong(); return (unsigned)ull; }