summaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-09-26 19:19:24 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2020-09-26 19:19:24 +0000
commit80b2585f2c5bed035d5fb9215533109ad00a3fc5 (patch)
tree6a3158f65d3c336b5ca05804b22171e100ed6bd4 /vespalib
parent72b6f0a82a7f1f7caec8cc58815b3802d94fb92d (diff)
Use && qualified member functions.
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/vespa/vespalib/data/databuffer.cpp2
-rw-r--r--vespalib/src/vespa/vespalib/data/databuffer.h5
2 files changed, 2 insertions, 5 deletions
diff --git a/vespalib/src/vespa/vespalib/data/databuffer.cpp b/vespalib/src/vespa/vespalib/data/databuffer.cpp
index 39c0f3f7482..04c4b1e225b 100644
--- a/vespalib/src/vespa/vespalib/data/databuffer.cpp
+++ b/vespalib/src/vespa/vespalib/data/databuffer.cpp
@@ -155,7 +155,7 @@ DataBuffer::swap(DataBuffer &other)
}
vespalib::alloc::Alloc
-DataBuffer::stealBuffer()
+DataBuffer::stealBuffer() &&
{
assert( ! referencesExternalData() );
_externalBuf = nullptr;
diff --git a/vespalib/src/vespa/vespalib/data/databuffer.h b/vespalib/src/vespa/vespalib/data/databuffer.h
index 3229921e09c..7c4cd63a7b1 100644
--- a/vespalib/src/vespa/vespalib/data/databuffer.h
+++ b/vespalib/src/vespa/vespalib/data/databuffer.h
@@ -40,7 +40,6 @@ private:
char *_freept;
Alloc _buffer;
- Alloc stealBuffer();
public:
typedef std::unique_ptr<DataBuffer> UP;
DataBuffer(const DataBuffer &) = delete;
@@ -607,9 +606,7 @@ public:
**/
void swap(DataBuffer &other);
- static Alloc stealBuffer(DataBuffer && buf) {
- return buf.stealBuffer();
- }
+ Alloc stealBuffer() &&;
};
} // namespace vespalib