mirror of
https://github.com/aria2/aria2.git
synced 2025-04-06 14:07:37 +03:00
Use raw pointers to PieceStorage, PeerStorage and DownloadContxt for BtMessages
This commit is contained in:
parent
09c597fbb8
commit
1a299c4d7c
21 changed files with 87 additions and 63 deletions
|
@ -85,8 +85,8 @@ void BtBitfieldMessageTest::testDoReceivedAction() {
|
|||
peer->allocateSessionResource(16*1024, 16*16*1024);
|
||||
BtBitfieldMessage msg;
|
||||
msg.setPeer(peer);
|
||||
std::shared_ptr<MockPieceStorage> pieceStorage(new MockPieceStorage());
|
||||
msg.setPieceStorage(pieceStorage);
|
||||
auto pieceStorage = make_unique<MockPieceStorage>();
|
||||
msg.setPieceStorage(pieceStorage.get());
|
||||
unsigned char bitfield[] = { 0xff, 0xff };
|
||||
msg.setBitfield(bitfield, sizeof(bitfield));
|
||||
|
||||
|
@ -103,8 +103,8 @@ void BtBitfieldMessageTest::testDoReceivedAction_goodByeSeeder()
|
|||
peer->allocateSessionResource(1024, 1024);
|
||||
BtBitfieldMessage msg;
|
||||
msg.setPeer(peer);
|
||||
std::shared_ptr<MockPieceStorage> pieceStorage(new MockPieceStorage());
|
||||
msg.setPieceStorage(pieceStorage);
|
||||
auto pieceStorage = make_unique<MockPieceStorage>();
|
||||
msg.setPieceStorage(pieceStorage.get());
|
||||
unsigned char bitfield[] = { 0x00 };
|
||||
msg.setBitfield(bitfield, sizeof(bitfield));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue