mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Disambiguate bytesRequired
This commit is contained in:
@@ -1135,7 +1135,7 @@ IntegerType const* RationalNumberType::integerType() const
|
||||
return nullptr;
|
||||
else
|
||||
return TypeProvider::integer(
|
||||
max(util::bytesRequired(value), 1u) * 8,
|
||||
max(util::numberEncodingSize(value), 1u) * 8,
|
||||
negative ? IntegerType::Modifier::Signed : IntegerType::Modifier::Unsigned
|
||||
);
|
||||
}
|
||||
@@ -1169,7 +1169,7 @@ FixedPointType const* RationalNumberType::fixedPointType() const
|
||||
if (v > u256(-1))
|
||||
return nullptr;
|
||||
|
||||
unsigned totalBits = max(util::bytesRequired(v), 1u) * 8;
|
||||
unsigned totalBits = max(util::numberEncodingSize(v), 1u) * 8;
|
||||
solAssert(totalBits <= 256, "");
|
||||
|
||||
return TypeProvider::fixedPoint(
|
||||
|
||||
Reference in New Issue
Block a user