2010-03-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Added vbegin() and vend() for fixed sized array.
	* src/DownloadHandlerConstants.cc
	* src/FeatureConfig.cc
	* src/OptionHandlerFactory.cc
	* src/ServerStat.cc
	* src/TimeA2.cc
	* src/XmlRpcMethod.cc
	* src/array_fun.h
	* src/download_helper.cc
	* src/messageDigest.cc
	* src/util.cc
	* test/BittorrentHelperTest.cc
	* test/DHTRoutingTableDeserializerTest.cc
	* test/DHTRoutingTableSerializerTest.cc
	* test/DefaultBtAnnounceTest.cc
	* test/DefaultBtProgressInfoFileTest.cc
	* test/DownloadContextTest.cc
	* test/DownloadHelperTest.cc
	* test/FeatureConfigTest.cc
	* test/FeedbackURISelectorTest.cc
	* test/HttpRequestTest.cc
	* test/InOrderURISelectorTest.cc
	* test/MSEHandshakeTest.cc
	* test/MultiDiskAdaptorTest.cc
	* test/MultiFileAllocationIteratorTest.cc
	* test/PriorityPieceSelectorTest.cc
	* test/RequestGroupManTest.cc
	* test/UtilTest.cc
	* test/XmlRpcMethodTest.cc
	* test/a2algoTest.cc
	* test/array_funTest.cc
This commit is contained in:
Tatsuhiro Tsujikawa 2010-03-25 13:51:10 +00:00
parent 8477e463e9
commit f15d22b619
31 changed files with 120 additions and 91 deletions

View file

@ -68,8 +68,7 @@ std::vector<SharedHandle<FileEntry> > createEntries() {
// *** file6
// |file7
// ** file8
std::vector<SharedHandle<FileEntry> > entries(&array[0],
&array[arrayLength(array)]);
std::vector<SharedHandle<FileEntry> > entries(vbegin(array), vend(array));
for(std::vector<SharedHandle<FileEntry> >::const_iterator i = entries.begin();
i != entries.end(); ++i) {
File((*i)->getPath()).remove();
@ -376,7 +375,7 @@ void MultiDiskAdaptorTest::testCutTrailingGarbage()
createFile(entries[i]->getPath(), entries[i]->getLength()+100);
}
std::vector<SharedHandle<FileEntry> > fileEntries
(&entries[0], &entries[arrayLength(entries)]);
(vbegin(entries), vend(entries));
MultiDiskAdaptor adaptor;
adaptor.setFileEntries(fileEntries.begin(), fileEntries.end());
@ -405,7 +404,7 @@ void MultiDiskAdaptorTest::testSize()
createFile(entries[i]->getPath(), entries[i]->getLength());
}
std::vector<SharedHandle<FileEntry> > fileEntries
(&entries[0], &entries[arrayLength(entries)]);
(vbegin(entries), vend(entries));
MultiDiskAdaptor adaptor;
adaptor.setFileEntries(fileEntries.begin(), fileEntries.end());
@ -435,7 +434,7 @@ void MultiDiskAdaptorTest::testUtime()
entries[2]->setRequested(false);
std::vector<SharedHandle<FileEntry> > fileEntries
(&entries[0], &entries[arrayLength(entries)]);
(vbegin(entries), vend(entries));
MultiDiskAdaptor adaptor;
adaptor.setFileEntries(fileEntries.begin(), fileEntries.end());