diff options
Diffstat (limited to 'qpid/cpp/src/qpid/framing/Buffer.cpp')
-rw-r--r-- | qpid/cpp/src/qpid/framing/Buffer.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/qpid/cpp/src/qpid/framing/Buffer.cpp b/qpid/cpp/src/qpid/framing/Buffer.cpp index 6c6b2661bd..215102807e 100644 --- a/qpid/cpp/src/qpid/framing/Buffer.cpp +++ b/qpid/cpp/src/qpid/framing/Buffer.cpp @@ -22,9 +22,9 @@ #include "FramingContent.h" #include "FieldTable.h" -qpid::framing::Buffer::Buffer(uint32_t _size) : size(_size), owner(true), position(0), limit(_size){ - data = new char[size]; -} +//qpid::framing::Buffer::Buffer(uint32_t _size) : size(_size), owner(true), position(0), limit(_size){ +// data = new char[size]; +//} qpid::framing::Buffer::Buffer(char* _data, uint32_t _size) : size(_size), owner(false), data(_data), position(0), limit(_size){ } @@ -33,23 +33,23 @@ qpid::framing::Buffer::~Buffer(){ if(owner) delete[] data; } -void qpid::framing::Buffer::flip(){ - limit = position; - position = 0; -} +//void qpid::framing::Buffer::flip(){ +// limit = position; +// position = 0; +//} -void qpid::framing::Buffer::clear(){ - limit = size; - position = 0; -} +//void qpid::framing::Buffer::clear(){ +// limit = size; +// position = 0; +//} -void qpid::framing::Buffer::compact(){ - uint32_t p = limit - position; - //copy p chars from position to 0 - memmove(data, data + position, p); - limit = size; - position = p; -} +//void qpid::framing::Buffer::compact(){ +// uint32_t p = limit - position; +// //copy p chars from position to 0 +// memmove(data, data + position, p); +// limit = size; +// position = p; +//} void qpid::framing::Buffer::record(){ r_position = position; @@ -65,13 +65,13 @@ uint32_t qpid::framing::Buffer::available(){ return limit - position; } -char* qpid::framing::Buffer::start(){ - return data + position; -} +//char* qpid::framing::Buffer::start(){ +// return data + position; +//} -void qpid::framing::Buffer::move(uint32_t bytes){ - position += bytes; -} +//void qpid::framing::Buffer::move(uint32_t bytes){ +// position += bytes; +//} void qpid::framing::Buffer::putOctet(uint8_t i){ data[position++] = i; |