mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Replace negative number literals by (0 - literal)
This commit is contained in:
parent
b57b8daf0a
commit
fdf4c1ed9a
@ -64,8 +64,8 @@ public:
|
|||||||
name(std::move(_name)), arguments(std::move(_arguments)), sort(std::move(_sort)) {}
|
name(std::move(_name)), arguments(std::move(_arguments)), sort(std::move(_sort)) {}
|
||||||
Expression(size_t _number): Expression(std::to_string(_number), {}, SortProvider::sintSort) {}
|
Expression(size_t _number): Expression(std::to_string(_number), {}, SortProvider::sintSort) {}
|
||||||
Expression(u256 const& _number): Expression(_number.str(), {}, SortProvider::sintSort) {}
|
Expression(u256 const& _number): Expression(_number.str(), {}, SortProvider::sintSort) {}
|
||||||
Expression(s256 const& _number): Expression(_number.str(), {}, SortProvider::sintSort) {}
|
Expression(s256 const& _number): Expression(_number.sign() >= 0 ? _number.str() : "-", _number.sign() >= 0 ? std::vector<Expression>{} : std::vector<Expression>{Expression(size_t(0)), u256(-_number)}, SortProvider::sintSort) {}
|
||||||
Expression(bigint const& _number): Expression(_number.str(), {}, SortProvider::sintSort) {}
|
Expression(bigint const& _number): Expression(_number.sign() >= 0 ? _number.str() : "-", _number.sign() >= 0 ? std::vector<Expression>{} : std::vector<Expression>{Expression(size_t(0)), u256(-_number)}, SortProvider::sintSort) {}
|
||||||
|
|
||||||
Expression(Expression const&) = default;
|
Expression(Expression const&) = default;
|
||||||
Expression(Expression&&) = default;
|
Expression(Expression&&) = default;
|
||||||
|
Loading…
Reference in New Issue
Block a user