From: Radoslaw Zarzynski Date: Fri, 17 Jan 2020 14:25:27 +0000 (+0100) Subject: common: drop the unused mutable_item_history container. X-Git-Tag: v15.1.0~190^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F32698%2Fhead;p=ceph.git common: drop the unused mutable_item_history container. Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/common/item_history.h b/src/common/item_history.h index bf0b504c546..87512a28c52 100644 --- a/src/common/item_history.h +++ b/src/common/item_history.h @@ -15,44 +15,6 @@ total lifetime. */ -template -class mutable_item_history { -private: - std::mutex lock; - std::list history; - T *current = nullptr; - -public: - mutable_item_history() { - history.emplace_back(T()); - current = &history.back(); - } - - // readers are lock-free - const T& operator*() const { - return *current; - } - const T *operator->() const { - return current; - } - - // non-const variants (be careful!) - T& operator*() { - return *current; - } - T *operator->() { - return current; - } - - // writes are serialized - const T& operator=(const T& other) { - std::lock_guard l(lock); - history.push_back(other); - current = &history.back(); - return *current; - } -}; - template class safe_item_history { private: