Problem: C-style casts used

Solution: replace by C++-style casts
This commit is contained in:
Simon Giesecke
2018-05-18 15:54:00 +02:00
parent d002eb5578
commit 4e616f30dd
52 changed files with 408 additions and 325 deletions

View File

@@ -70,7 +70,8 @@ int zmq::v1_decoder_t::one_byte_size_ready (unsigned char const *)
return -1;
}
if (maxmsgsize >= 0 && (int64_t) (*tmpbuf - 1) > maxmsgsize) {
if (maxmsgsize >= 0
&& static_cast<int64_t> (*tmpbuf - 1) > maxmsgsize) {
errno = EMSGSIZE;
return -1;
}
@@ -104,7 +105,8 @@ int zmq::v1_decoder_t::eight_byte_size_ready (unsigned char const *)
}
// Message size must not exceed the maximum allowed size.
if (maxmsgsize >= 0 && payload_length - 1 > (uint64_t) maxmsgsize) {
if (maxmsgsize >= 0
&& payload_length - 1 > static_cast<uint64_t> (maxmsgsize)) {
errno = EMSGSIZE;
return -1;
}