diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-06-22 01:10:38 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-06-22 01:10:38 +0900 |
| commit | 07d270c87e6f9184aea4ca17eb26e466712e8db2 (patch) | |
| tree | 2dfbaa2e0d2ad0f38cb73098608f7d67a64320f8 /src/RequestSlot.h | |
| parent | 126a4bde612eb0e6c48cf2f13ebe3eac45cc71a8 (diff) | |
Require -std=c++11 and use std::shared_ptr instead of SharedHandle
Diffstat (limited to 'src/RequestSlot.h')
| -rw-r--r-- | src/RequestSlot.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/RequestSlot.h b/src/RequestSlot.h index 9ad5e9fe..cb1f073e 100644 --- a/src/RequestSlot.h +++ b/src/RequestSlot.h @@ -55,7 +55,7 @@ private: // PieceStorage::getPiece() repeatedly. It turns out that this process // takes time(about 1.7% of processing time). To reduce it, we put piece here // at the construction of RequestSlot as a cache. - SharedHandle<Piece> piece_; + std::shared_ptr<Piece> piece_; // inlined for performance reason void copy(const RequestSlot& requestSlot) @@ -70,7 +70,7 @@ private: public: RequestSlot(size_t index, int32_t begin, int32_t length, size_t blockIndex, - const SharedHandle<Piece>& piece = SharedHandle<Piece>()): + const std::shared_ptr<Piece>& piece = std::shared_ptr<Piece>()): dispatchedTime_(global::wallclock()), index_(index), begin_(begin), length_(length), blockIndex_(blockIndex), piece_(piece) {} @@ -133,7 +133,7 @@ public: size_t getBlockIndex() const { return blockIndex_; } void setBlockIndex(size_t blockIndex) { blockIndex_ = blockIndex; } - const SharedHandle<Piece>& getPiece() const + const std::shared_ptr<Piece>& getPiece() const { return piece_; } |
