summaryrefslogtreecommitdiffstats
path: root/document/src/vespa/document/util/bytebuffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'document/src/vespa/document/util/bytebuffer.h')
-rw-r--r--document/src/vespa/document/util/bytebuffer.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/document/src/vespa/document/util/bytebuffer.h b/document/src/vespa/document/util/bytebuffer.h
index 1eb359e261b..4c367c0f143 100644
--- a/document/src/vespa/document/util/bytebuffer.h
+++ b/document/src/vespa/document/util/bytebuffer.h
@@ -29,7 +29,7 @@ public:
ByteBuffer& operator=(ByteBuffer &&) = default;
ByteBuffer() : ByteBuffer(nullptr, 0) { }
- ~ByteBuffer();
+ ~ByteBuffer() = default;
/**
* Create a buffer with the given content.
@@ -37,7 +37,12 @@ public:
* @param buffer The buffer to represent.
* @param len The length of the buffer
*/
- ByteBuffer(const char* buffer, uint32_t len);
+ ByteBuffer(const char* buffer, uint32_t len)
+ : _buffer(const_cast<char *>(buffer)),
+ _len(len),
+ _pos(0),
+ _ownedBuffer()
+ { }
/**
* Create a buffer with the given content.