Commit 99cbb9ce authored by Aaron Roth's avatar Aaron Roth Committed by facebook-github-bot-9

Missed some derivation from boost::noncopyable after deleting the .hpp header.

Summary: There remained some derivations from boost::noncopyable in inner classes after boost/noncopyable.hpp was deleted in D2459355. Get rid of these two.

Reviewed By: meyering

Differential Revision: D2485930

fb-gh-sync-id: 89546490b15fa4279debf4b9cabcf48d3dc336bb
parent 6d3bf646
...@@ -141,7 +141,6 @@ pthread_rwlock_t Read 728698 24us 101ns 7.28ms 194us ...@@ -141,7 +141,6 @@ pthread_rwlock_t Read 728698 24us 101ns 7.28ms 194us
#include <atomic> #include <atomic>
#include <string> #include <string>
#include <algorithm> #include <algorithm>
#include <boost/noncopyable.hpp>
#include <sched.h> #include <sched.h>
#include <glog/logging.h> #include <glog/logging.h>
...@@ -672,8 +671,11 @@ class RWTicketSpinLockT { ...@@ -672,8 +671,11 @@ class RWTicketSpinLockT {
class WriteHolder; class WriteHolder;
typedef RWTicketSpinLockT<kBitWidth, kFavorWriter> RWSpinLock; typedef RWTicketSpinLockT<kBitWidth, kFavorWriter> RWSpinLock;
class ReadHolder : boost::noncopyable { class ReadHolder {
public: public:
ReadHolder(ReadHolder const&) = delete;
ReadHolder& operator=(ReadHolder const&) = delete;
explicit ReadHolder(RWSpinLock *lock = nullptr) : explicit ReadHolder(RWSpinLock *lock = nullptr) :
lock_(lock) { lock_(lock) {
if (lock_) lock_->lock_shared(); if (lock_) lock_->lock_shared();
...@@ -709,8 +711,11 @@ class RWTicketSpinLockT { ...@@ -709,8 +711,11 @@ class RWTicketSpinLockT {
RWSpinLock *lock_; RWSpinLock *lock_;
}; };
class WriteHolder : boost::noncopyable { class WriteHolder {
public: public:
WriteHolder(WriteHolder const&) = delete;
WriteHolder& operator=(WriteHolder const&) = delete;
explicit WriteHolder(RWSpinLock *lock = nullptr) : lock_(lock) { explicit WriteHolder(RWSpinLock *lock = nullptr) : lock_(lock) {
if (lock_) lock_->lock(); if (lock_) lock_->lock();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment