mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Split Common.h into Numeric.h.
This commit is contained in:
@@ -274,7 +274,7 @@ uint32_t ContractDefinition::interfaceId() const
|
||||
{
|
||||
uint32_t result{0};
|
||||
for (auto const& function: interfaceFunctionList(false))
|
||||
result ^= util::fromBigEndian<uint32_t>(function.first.ref());
|
||||
result ^= fromBigEndian<uint32_t>(function.first.ref());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -1135,7 +1135,7 @@ IntegerType const* RationalNumberType::integerType() const
|
||||
return nullptr;
|
||||
else
|
||||
return TypeProvider::integer(
|
||||
max(util::numberEncodingSize(value), 1u) * 8,
|
||||
max(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::numberEncodingSize(v), 1u) * 8;
|
||||
unsigned totalBits = max(numberEncodingSize(v), 1u) * 8;
|
||||
solAssert(totalBits <= 256, "");
|
||||
|
||||
return TypeProvider::fixedPoint(
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <liblangutil/Exceptions.h>
|
||||
|
||||
#include <libsolutil/Common.h>
|
||||
#include <libsolutil/Numeric.h>
|
||||
#include <libsolutil/CommonIO.h>
|
||||
#include <libsolutil/LazyInit.h>
|
||||
#include <libsolutil/Result.h>
|
||||
|
||||
Reference in New Issue
Block a user