We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ee9444f + 13f83d5 commit 0da9766Copy full SHA for 0da9766
src/util/mp_arith.cpp
@@ -195,14 +195,16 @@ mp_integer::ullong_t integer2ulong(const mp_integer &n)
195
std::size_t integer2size_t(const mp_integer &n)
196
{
197
PRECONDITION(n>=0 && n<=std::numeric_limits<std::size_t>::max());
198
- mp_integer::ullong_t ull=integer2ulong(n);
+ PRECONDITION(n.is_ulong());
199
+ mp_integer::ullong_t ull = n.to_ulong();
200
return (std::size_t) ull;
201
}
202
203
unsigned integer2unsigned(const mp_integer &n)
204
205
PRECONDITION(n>=0 && n<=std::numeric_limits<unsigned>::max());
206
207
208
return (unsigned)ull;
209
210
0 commit comments