diff options
author | Andrew Morrow <acm@mongodb.com> | 2015-06-10 17:43:13 -0400 |
---|---|---|
committer | Andrew Morrow <acm@mongodb.com> | 2015-06-10 22:37:44 -0400 |
commit | a9b6612f5322f916298c19a6728817a1034c6aab (patch) | |
tree | 0da5b1ce36e6a8e2d85dbdeb49d505ac99bf6e1d /src/mongo/db/storage/mmap_v1/dur_recover.cpp | |
parent | 0ec1e625760eb9c1a20a3dba78200e8f9ff28d9e (diff) | |
download | mongo-a9b6612f5322f916298c19a6728817a1034c6aab.tar.gz |
SERVER-17309 Replace std::auto_ptr<T> with std::unique_ptr<T>
Diffstat (limited to 'src/mongo/db/storage/mmap_v1/dur_recover.cpp')
-rw-r--r-- | src/mongo/db/storage/mmap_v1/dur_recover.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/db/storage/mmap_v1/dur_recover.cpp b/src/mongo/db/storage/mmap_v1/dur_recover.cpp index b6d997d4025..5e61e39930f 100644 --- a/src/mongo/db/storage/mmap_v1/dur_recover.cpp +++ b/src/mongo/db/storage/mmap_v1/dur_recover.cpp @@ -59,7 +59,7 @@ namespace mongo { using boost::shared_ptr; - using std::auto_ptr; + using std::unique_ptr; using std::endl; using std::hex; using std::map; @@ -157,7 +157,7 @@ namespace mongo { const char *p = _uncompressed.c_str(); verify(compressedLen == _h.sectionLen() - sizeof(JSectFooter) - sizeof(JSectHeader)); - _entries = auto_ptr<BufReader>(new BufReader(p, _uncompressed.size())); + _entries = unique_ptr<BufReader>(new BufReader(p, _uncompressed.size())); } // We work with the uncompressed buffer when doing a WRITETODATAFILES (for speed) @@ -228,7 +228,7 @@ namespace mongo { private: - auto_ptr<BufReader> _entries; + unique_ptr<BufReader> _entries; const JSectHeader _h; const char *_lastDbName; // pointer into mmaped journal file const bool _doDurOps; @@ -412,12 +412,12 @@ namespace mongo { return; } - auto_ptr<JournalSectionIterator> i; + unique_ptr<JournalSectionIterator> i; if( _recovering ) { - i = auto_ptr<JournalSectionIterator>(new JournalSectionIterator(*h, p, len, _recovering)); + i = unique_ptr<JournalSectionIterator>(new JournalSectionIterator(*h, p, len, _recovering)); } else { - i = auto_ptr<JournalSectionIterator>(new JournalSectionIterator(*h, /*after header*/p, /*w/out header*/len)); + i = unique_ptr<JournalSectionIterator>(new JournalSectionIterator(*h, /*after header*/p, /*w/out header*/len)); } // we use a static so that we don't have to reallocate every time through. occasionally we |