diff --git a/CGAL_Core/include/CGAL/CORE/BigInt.h b/CGAL_Core/include/CGAL/CORE/BigInt.h index cc23ecceafe1..8904db58b6f4 100644 --- a/CGAL_Core/include/CGAL/CORE/BigInt.h +++ b/CGAL_Core/include/CGAL/CORE/BigInt.h @@ -159,9 +159,9 @@ inline long ceilLg(const BigInt& a) { if (sign(a) == 0) return -1; assert(std::size_t((std::numeric_limits::max)()) > bitLength(a)); - long len = static_cast(bitLength(a)); + std::size_t len = static_cast(bitLength(a)); - return (lsb(abs(a)) == len - 1) ? (len - 1) : len; + return (lsb(abs(a)) == len - 1) ? (static_cast(len) - 1) : static_cast(len); } inline long ceilLg(long a) { // need this for Polynomial