Commit 8820e35a authored by hitstergtd's avatar hitstergtd

Problem: style issues in decoder.hpp

Solution: fix it
parent 95acb29b
...@@ -119,7 +119,8 @@ namespace zmq ...@@ -119,7 +119,8 @@ namespace zmq
bytes_used_ = size_; bytes_used_ = size_;
while (!to_read) { while (!to_read) {
const int rc = (static_cast <T *> (this)->*next) (data_ + bytes_used_); const int rc =
(static_cast <T *> (this)->*next) (data_ + bytes_used_);
if (rc != 0) if (rc != 0)
return rc; return rc;
} }
...@@ -128,11 +129,11 @@ namespace zmq ...@@ -128,11 +129,11 @@ namespace zmq
while (bytes_used_ < size_) { while (bytes_used_ < size_) {
// Copy the data from buffer to the message. // Copy the data from buffer to the message.
const std::size_t to_copy = std::min (to_read, size_ - bytes_used_); const size_t to_copy = std::min (to_read, size_ - bytes_used_);
// only copy when the destination address is different from the // Only copy when destination address is different from the
// current address in the buffer // current address in the buffer.
if (read_pos != data_ + bytes_used_) { if (read_pos != data_ + bytes_used_) {
std::memcpy (read_pos, data_ + bytes_used_, to_copy); memcpy (read_pos, data_ + bytes_used_, to_copy);
} }
read_pos += to_copy; read_pos += to_copy;
...@@ -142,7 +143,8 @@ namespace zmq ...@@ -142,7 +143,8 @@ namespace zmq
// If none is available, return. // If none is available, return.
while (to_read == 0) { while (to_read == 0) {
// pass current address in the buffer // pass current address in the buffer
const int rc = (static_cast <T *> (this)->*next) (data_ + bytes_used_); const int rc =
(static_cast <T *> (this)->*next) (data_ + bytes_used_);
if (rc != 0) if (rc != 0)
return rc; return rc;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment