mirror of
https://github.com/aria2/aria2.git
synced 2025-04-05 05:27:38 +03:00
AbstractSingleDiskAdaptor: Use std::unique_ptr for diskWriter_
This commit is contained in:
parent
f8d305fe63
commit
ae84ff26e2
9 changed files with 60 additions and 54 deletions
|
@ -66,8 +66,12 @@ void UTMetadataDataExtensionMessageTest::testToString()
|
|||
void UTMetadataDataExtensionMessageTest::testDoReceivedAction()
|
||||
{
|
||||
auto diskAdaptor = std::make_shared<DirectDiskAdaptor>();
|
||||
auto diskWriter = std::make_shared<ByteArrayDiskWriter>();
|
||||
diskAdaptor->setDiskWriter(diskWriter);
|
||||
ByteArrayDiskWriter* diskWriter;
|
||||
{
|
||||
auto dw = make_unique<ByteArrayDiskWriter>();
|
||||
diskWriter = dw.get();
|
||||
diskAdaptor->setDiskWriter(std::move(dw));
|
||||
}
|
||||
auto pieceStorage = make_unique<MockPieceStorage>();
|
||||
pieceStorage->setDiskAdaptor(diskAdaptor);
|
||||
auto tracker = make_unique<UTMetadataRequestTracker>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue