Problem: C-style casts used

Solution: use static_cast instead
This commit is contained in:
Simon Giesecke
2019-12-25 16:01:40 +01:00
parent 78961eeab7
commit 406c423c9a
10 changed files with 24 additions and 17 deletions

View File

@@ -115,8 +115,8 @@ int zmq::v2_decoder_t::size_ready (uint64_t msg_size_,
shared_message_memory_allocator &allocator = get_allocator ();
if (unlikely (!_zero_copy
|| msg_size_ > (size_t) (allocator.data () + allocator.size ()
- read_pos_))) {
|| msg_size_ > static_cast<size_t> (
allocator.data () + allocator.size () - read_pos_))) {
// a new message has started, but the size would exceed the pre-allocated arena
// this happens every time when a message does not fit completely into the buffer
rc = _in_progress.init_size (static_cast<size_t> (msg_size_));