Skip to content

Commit

Permalink
perf: save one ISZERO in _disableInitializers
Browse files Browse the repository at this point in the history
  • Loading branch information
MathisGD committed Oct 27, 2022
1 parent 36951d5 commit 20f72ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/proxy/utils/Initializable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ abstract contract Initializable {
*/
function _disableInitializers() internal virtual {
require(!_initializing, "Initializable: contract is initializing");
if (_initialized < type(uint8).max) {
if (_initialized != type(uint8).max) {
_initialized = type(uint8).max;
emit Initialized(type(uint8).max);
}
Expand Down

0 comments on commit 20f72ec

Please sign in to comment.