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
@@ -169,7 +169,7 @@ public:
static bytes encode(size_t _value) { return encode(u256(_value)); }
static bytes encode(char const* _value) { return encode(std::string(_value)); }
static bytes encode(uint8_t _value) { return bytes(31, 0) + bytes{_value}; }
static bytes encode(u256 const& _value) { return util::toBigEndian(_value); }
static bytes encode(u256 const& _value) { return toBigEndian(_value); }
/// @returns the fixed-point encoding of a rational number with a given
/// number of fractional bits.
static bytes encode(std::pair<rational, int> const& _valueAndPrecision)