mirror of
https://github.com/aria2/aria2.git
synced 2025-04-05 05:27:38 +03:00
2010-02-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use vector instead of deque for containers which is used for mostly read-only purpose.
This commit is contained in:
parent
135f0a2a8c
commit
c342bde962
277 changed files with 1280 additions and 1232 deletions
|
@ -58,7 +58,7 @@ void RequestGroupManTest::testIsSameFileBeingDownloaded()
|
|||
rg1->setDownloadContext(dctx1);
|
||||
rg2->setDownloadContext(dctx2);
|
||||
|
||||
RequestGroupMan gm(std::deque<SharedHandle<RequestGroup> >(), 1,
|
||||
RequestGroupMan gm(std::vector<SharedHandle<RequestGroup> >(), 1,
|
||||
_option.get());
|
||||
|
||||
gm.addRequestGroup(rg1);
|
||||
|
@ -79,7 +79,8 @@ void RequestGroupManTest::testGetInitialCommands()
|
|||
|
||||
void RequestGroupManTest::testSaveServerStat()
|
||||
{
|
||||
RequestGroupMan rm(std::deque<SharedHandle<RequestGroup> >(),0,_option.get());
|
||||
RequestGroupMan rm
|
||||
(std::vector<SharedHandle<RequestGroup> >(),0,_option.get());
|
||||
SharedHandle<ServerStat> ss_localhost(new ServerStat("localhost", "http"));
|
||||
rm.addServerStat(ss_localhost);
|
||||
File f("/tmp/aria2_RequestGroupManTest_testSaveServerStat");
|
||||
|
@ -102,7 +103,8 @@ void RequestGroupManTest::testLoadServerStat()
|
|||
<< "status=OK";
|
||||
o.close();
|
||||
|
||||
RequestGroupMan rm(std::deque<SharedHandle<RequestGroup> >(),0,_option.get());
|
||||
RequestGroupMan rm
|
||||
(std::vector<SharedHandle<RequestGroup> >(),0,_option.get());
|
||||
std::cerr << "testLoadServerStat" << std::endl;
|
||||
CPPUNIT_ASSERT(rm.loadServerStat(f.getPath()));
|
||||
SharedHandle<ServerStat> ss_localhost = rm.findServerStat("localhost",
|
||||
|
@ -119,7 +121,7 @@ void RequestGroupManTest::testChangeReservedGroupPosition()
|
|||
SharedHandle<RequestGroup>(new RequestGroup(_option)),
|
||||
SharedHandle<RequestGroup>(new RequestGroup(_option))
|
||||
};
|
||||
std::deque<SharedHandle<RequestGroup> > groups(&gs[0], &gs[arrayLength(gs)]);
|
||||
std::vector<SharedHandle<RequestGroup> > groups(&gs[0], &gs[arrayLength(gs)]);
|
||||
RequestGroupMan rm(groups, 0, _option.get());
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue