Problem: formatting inconsistent

Solution: applied clang-format
This commit is contained in:
sigiesec
2018-02-01 11:46:09 +01:00
parent 6d8baea714
commit 41f459e1dc
331 changed files with 13208 additions and 13691 deletions

View File

@@ -34,8 +34,7 @@
#include "raw_decoder.hpp"
#include "err.hpp"
zmq::raw_decoder_t::raw_decoder_t (size_t bufsize_) :
allocator( bufsize_, 1 )
zmq::raw_decoder_t::raw_decoder_t (size_t bufsize_) : allocator (bufsize_, 1)
{
int rc = in_progress.init ();
errno_assert (rc == 0);
@@ -49,23 +48,24 @@ zmq::raw_decoder_t::~raw_decoder_t ()
void zmq::raw_decoder_t::get_buffer (unsigned char **data_, size_t *size_)
{
*data_ = allocator.allocate();
*size_ = allocator.size();
*data_ = allocator.allocate ();
*size_ = allocator.size ();
}
int zmq::raw_decoder_t::decode (const uint8_t *data_, size_t size_,
int zmq::raw_decoder_t::decode (const uint8_t *data_,
size_t size_,
size_t &bytes_used_)
{
int rc = in_progress.init ((unsigned char*)data_, size_,
shared_message_memory_allocator::call_dec_ref,
allocator.buffer (),
allocator.provide_content ());
int rc =
in_progress.init ((unsigned char *) data_, size_,
shared_message_memory_allocator::call_dec_ref,
allocator.buffer (), allocator.provide_content ());
// if the buffer serves as memory for a zero-copy message, release it
// and allocate a new buffer in get_buffer for the next decode
if (in_progress.is_zcmsg ()) {
allocator.advance_content();
allocator.release();
allocator.advance_content ();
allocator.release ();
}
errno_assert (rc != -1);