Remove operator~ from FixedHash

This commit is contained in:
Alex Beregszaszi 2019-12-14 13:42:04 +00:00
parent 3c88d295b3
commit 4d8758fcc3
2 changed files with 1 additions and 3 deletions

View File

@ -84,8 +84,6 @@ public:
/// Required to sort objects of this type or use them as map keys.
bool operator<(FixedHash const& _c) const { for (unsigned i = 0; i < N; ++i) if (m_data[i] < _c.m_data[i]) return true; else if (m_data[i] > _c.m_data[i]) return false; return false; }
FixedHash operator~() const { FixedHash ret; for (unsigned i = 0; i < N; ++i) ret[i] = ~m_data[i]; return ret; }
/// @returns a particular byte from the hash.
uint8_t& operator[](unsigned _i) { return m_data[_i]; }
/// @returns a particular byte from the hash.

View File

@ -465,7 +465,7 @@ BOOST_AUTO_TEST_CASE(creation)
deployWallet(200);
BOOST_REQUIRE(callContractFunction("isOwner(address)", h256(m_sender, h256::AlignRight)) == encodeArgs(true));
bool v2 = solidity::test::Options::get().useABIEncoderV2;
BOOST_REQUIRE(callContractFunction("isOwner(address)", ~h256(m_sender, h256::AlignRight)) == (v2 ? encodeArgs() : encodeArgs(false)));
BOOST_REQUIRE(callContractFunction("isOwner(address)", h256(~0)) == (v2 ? encodeArgs() : encodeArgs(false)));
}
BOOST_AUTO_TEST_CASE(add_owners)