diff --git a/tools/inspector_protocol/encoding/encoding.cc b/tools/inspector_protocol/encoding/encoding.cc index 7eb499f9712a25..9a869bbbee29b4 100644 --- a/tools/inspector_protocol/encoding/encoding.cc +++ b/tools/inspector_protocol/encoding/encoding.cc @@ -833,9 +833,8 @@ void CBORTokenizer::ReadNextToken(bool enter_envelope) { // inspector_protocol, it's not a CBOR limitation), so we check // against the signed max, so that the allowable values are // 0, 1, 2, ... 2^31 - 1. - if (!success || - static_cast(std::numeric_limits::max()) < - static_cast(token_start_internal_value_)) { + if (!success || std::numeric_limits::max() < + token_start_internal_value_) { SetError(Error::CBOR_INVALID_INT32); return; } diff --git a/tools/inspector_protocol/lib/encoding_cpp.template b/tools/inspector_protocol/lib/encoding_cpp.template index c5b6489652a9f2..d24e9286a12f79 100644 --- a/tools/inspector_protocol/lib/encoding_cpp.template +++ b/tools/inspector_protocol/lib/encoding_cpp.template @@ -840,9 +840,8 @@ void CBORTokenizer::ReadNextToken(bool enter_envelope) { // inspector_protocol, it's not a CBOR limitation), so we check // against the signed max, so that the allowable values are // 0, 1, 2, ... 2^31 - 1. - if (!success || - static_cast(std::numeric_limits::max()) < - static_cast(token_start_internal_value_)) { + if (!success || std::numeric_limits::max() < + token_start_internal_value_) { SetError(Error::CBOR_INVALID_INT32); return; }