diff --git a/include/mcl/conversion.hpp b/include/mcl/conversion.hpp index 6f24344..99f5100 100644 --- a/include/mcl/conversion.hpp +++ b/include/mcl/conversion.hpp @@ -22,7 +22,7 @@ namespace mcl { namespace fp { return false if sizeof(D) * dstN < sizeof(S) * srcN */ template -bool setArrayAsLE(D *dst, size_t dstN, const S *src, size_t srcN) +bool convertArrayAsLE(D *dst, size_t dstN, const S *src, size_t srcN) { char assert_D_is_unsigned[D(-1) < 0 ? -1 : 1]; char assert_S_is_unsigned[S(-1) < 0 ? -1 : 1]; diff --git a/include/mcl/gmp_util.hpp b/include/mcl/gmp_util.hpp index 96e0605..bc489cf 100644 --- a/include/mcl/gmp_util.hpp +++ b/include/mcl/gmp_util.hpp @@ -67,14 +67,14 @@ template void getArray(bool *pb, T *buf, size_t maxSize, const mpz_class& x) { #ifdef MCL_USE_VINT - *pb = fp::setArrayAsLE(buf, maxSize, x.getUnit(), x.getUnitSize()); + *pb = fp::convertArrayAsLE(buf, maxSize, x.getUnit(), x.getUnitSize()); #else int n = x.get_mpz_t()->_mp_size; if (n < 0) { *pb = false; return; } - *pb = fp::setArrayAsLE(buf, maxSize, x.get_mpz_t()->_mp_d, n); + *pb = fp::convertArrayAsLE(buf, maxSize, x.get_mpz_t()->_mp_d, n); #endif } inline void set(mpz_class& z, uint64_t x) diff --git a/include/mcl/vint.hpp b/include/mcl/vint.hpp index 7e5accb..e6b6ea2 100644 --- a/include/mcl/vint.hpp +++ b/include/mcl/vint.hpp @@ -1179,7 +1179,7 @@ public: size_t unitSize = (sizeof(S) * size + sizeof(Unit) - 1) / sizeof(Unit); buf_.alloc(pb, unitSize); if (!*pb) return; - bool b = fp::setArrayAsLE(&buf_[0], unitSize, x, size); + bool b = fp::convertArrayAsLE(&buf_[0], unitSize, x, size); assert(b); (void)b; trim(unitSize);