Split Common.h into Numeric.h.

This commit is contained in:
chriseth
2021-09-23 15:27:29 +02:00
parent c8e6ef9657
commit 1531863835
65 changed files with 318 additions and 215 deletions
+1 -1
View File
@@ -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;
}
+2 -2
View File
@@ -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(
+1
View File
@@ -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>