From 101ca58e9fc41f326ca5e75b2f75b85943942bbf Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 26 Apr 2011 10:17:47 -0700 Subject: [PATCH] objectstore: implement Transaction::swap() Signed-off-by: Sage Weil --- src/os/ObjectStore.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/os/ObjectStore.h b/src/os/ObjectStore.h index 16cc2f6b408c7..d582712ec392c 100644 --- a/src/os/ObjectStore.h +++ b/src/os/ObjectStore.h @@ -159,6 +159,14 @@ public: public: + void swap(Transaction& other) { + std::swap(ops, other.ops); + std::swap(largest_data_len, other.largest_data_len); + std::swap(largest_data_off, other.largest_data_off); + std::swap(largest_data_off_in_tbl, other.largest_data_off_in_tbl); + tbl.swap(other.tbl); + } + void append(Transaction& other) { ops += other.ops; assert(pad_unused_bytes == 0); -- 2.39.5