]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rocksdb/table/block_based/block_builder.cc
import quincy beta 17.1.0
[ceph.git] / ceph / src / rocksdb / table / block_based / block_builder.cc
index 6f77ef97c0c38b5189ad7ae1e0733b5d0e9416c8..4964ba3aee65a63951fea81b6da29495d6bd1ecc 100644 (file)
@@ -81,6 +81,11 @@ void BlockBuilder::Reset() {
   }
 }
 
+void BlockBuilder::SwapAndReset(std::string& buffer) {
+  std::swap(buffer_, buffer);
+  Reset();
+}
+
 size_t BlockBuilder::EstimateSizeAfterKV(const Slice& key,
                                          const Slice& value) const {
   size_t estimate = CurrentSizeEstimate();