summaryrefslogtreecommitdiffstats
path: root/document
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-01-27 20:51:02 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2020-01-28 10:42:13 +0000
commiteaadbb55865ed7e4a8d7435368152a6c83a7718c (patch)
treec862fb9a7db27f239e128f9d861be504701b0a4e /document
parent449bb1c1ee96d24c1bb95664700c98963a12a98e (diff)
Inline
Diffstat (limited to 'document')
-rw-r--r--document/src/vespa/document/util/bytebuffer.cpp10
-rw-r--r--document/src/vespa/document/util/bytebuffer.h9
2 files changed, 7 insertions, 12 deletions
diff --git a/document/src/vespa/document/util/bytebuffer.cpp b/document/src/vespa/document/util/bytebuffer.cpp
index bc7e726cb06..644edb0664d 100644
--- a/document/src/vespa/document/util/bytebuffer.cpp
+++ b/document/src/vespa/document/util/bytebuffer.cpp
@@ -61,14 +61,6 @@ BufferOutOfBoundsException::BufferOutOfBoundsException(size_t pos, size_t len, c
{
}
-ByteBuffer::ByteBuffer(const char* buffer, uint32_t len) :
- _buffer(const_cast<char *>(buffer)),
- _len(len),
- _pos(0),
- _ownedBuffer()
-{
-}
-
ByteBuffer::ByteBuffer(Alloc buffer, uint32_t len)
: _buffer(static_cast<const char *>(buffer.get())),
_len(len),
@@ -99,8 +91,6 @@ ByteBuffer::ByteBuffer(const ByteBuffer& rhs)
}
}
-ByteBuffer::~ByteBuffer() = default;
-
ByteBuffer
ByteBuffer::copyBuffer(const char* buffer, uint32_t len)
{
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.