Skip to content

Commit 96aef1e

Browse files
committed
replace false equality checks with negation
1 parent e793bc2 commit 96aef1e

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

contracts/multisig/ECDSAMultisigWalletStorage.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ library ECDSAMultisigWalletStorage {
6161
function addSigner(Layout storage l, address account) internal {
6262
if (l.signers.length() >= 256)
6363
revert ECDSAMultisigWalletStorage__SignerLimitReached();
64-
if (l.signers.add(account) == false)
64+
if (!l.signers.add(account))
6565
revert ECDSAMultisigWalletStorage__AddSignerFailed();
6666
}
6767

6868
function removeSigner(Layout storage l, address account) internal {
6969
if (l.quorum > l.signers.length() - 1)
7070
revert ECDSAMultisigWalletStorage__InsufficientSigners();
71-
if (l.signers.remove(account) == false)
71+
if (!l.signers.remove(account))
7272
revert ECDSAMultisigWalletStorage__RemoveSignerFailed();
7373
}
7474
}

contracts/proxy/diamond/base/DiamondBaseStorage.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ library DiamondBaseStorage {
122122
unchecked {
123123
if (
124124
facetCut.target != address(this) &&
125-
facetCut.target.isContract() == false
125+
!facetCut.target.isContract()
126126
) revert DiamondBaseStorage__TargetHasNoCode();
127127

128128
for (uint256 i; i < facetCut.selectors.length; i++) {

contracts/token/ERC1155/base/ERC1155Base.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ abstract contract ERC1155Base is IERC1155Base, ERC1155BaseInternal {
8585
uint256 amount,
8686
bytes memory data
8787
) public virtual {
88-
if (from != msg.sender && isApprovedForAll(from, msg.sender) == false)
88+
if (from != msg.sender && !isApprovedForAll(from, msg.sender))
8989
revert ERC1155Base__NotOwnerOrApproved();
9090
_safeTransfer(msg.sender, from, to, id, amount, data);
9191
}
@@ -100,7 +100,7 @@ abstract contract ERC1155Base is IERC1155Base, ERC1155BaseInternal {
100100
uint256[] memory amounts,
101101
bytes memory data
102102
) public virtual {
103-
if (from != msg.sender && isApprovedForAll(from, msg.sender) == false)
103+
if (from != msg.sender && !isApprovedForAll(from, msg.sender))
104104
revert ERC1155Base__NotOwnerOrApproved();
105105
_safeTransferBatch(msg.sender, from, to, ids, amounts, data);
106106
}

0 commit comments

Comments
 (0)