diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-01-23 10:13:00 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-01-26 11:05:01 +0900 |
commit | 3b1e4bbb3df6a0de8aa0693038449c6f0359ce91 (patch) | |
tree | 068068e7b1b6202c635bd655e346f838d715373c /indexlib/mempool.h | |
parent | b0f8eef013163b2098c2bb07e93cb9b194338b80 (diff) | |
download | tdepim-3b1e4bbb3df6a0de8aa0693038449c6f0359ce91.tar.gz tdepim-3b1e4bbb3df6a0de8aa0693038449c6f0359ce91.zip |
Replace auto_ptr
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit d2f343cc239e1fa25c9581cf35bada96692c41db)
Diffstat (limited to 'indexlib/mempool.h')
-rw-r--r-- | indexlib/mempool.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/indexlib/mempool.h b/indexlib/mempool.h index acf624948..08be88578 100644 --- a/indexlib/mempool.h +++ b/indexlib/mempool.h @@ -55,7 +55,9 @@ struct mempool /* : boost::noncopyable */ { typedef Traits traits_type; typedef typename traits_type::value_type data_type; typedef typename traits_type::pointer data_typeptr; - explicit mempool( std::auto_ptr<memory_manager> source ); + explicit mempool( std::unique_ptr<memory_manager> &&source ); + mempool(mempool const &) = delete; + mempool& operator=(mempool const &) = delete; /** * Returns a memory block of size \param s. @@ -151,7 +153,7 @@ struct mempool /* : boost::noncopyable */ { bool join( data_typeptr&, unsigned order ); void deallocate( data_typeptr, unsigned order ); - std::auto_ptr<memory_manager> manager_; + std::unique_ptr<memory_manager> manager_; memory_reference<uint32_t> max_order_; }; |