2010-10-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Use unnamed namespace instead of static keyword.
	* src/AbstractCommand.cc
	* src/AdaptiveURISelector.cc
	* src/Base64.cc
	* src/BitfieldMan.cc
	* src/BtDependency.cc
	* src/ConsoleStatCalc.cc
	* src/ContentTypeRequestGroupCriteria.cc
	* src/CookieStorage.cc
	* src/DHTMessageFactoryImpl.cc
	* src/DHTRoutingTableDeserializer.cc
	* src/DefaultBtAnnounce.cc
	* src/DefaultBtProgressInfoFile.cc
	* src/DefaultPeerStorage.cc
	* src/DefaultPieceStorage.cc
	* src/DownloadCommand.cc
	* src/DownloadEngine.cc
	* src/EpollEventPoll.cc
	* src/ExpatMetalinkProcessor.cc
	* src/ExpatXmlRpcRequestProcessor.cc
	* src/FileEntry.cc
	* src/HttpRequest.cc
	* src/HttpRequestCommand.cc
	* src/HttpResponseCommand.cc
	* src/KqueueEventPoll.cc
	* src/LongestSequencePieceSelector.cc
	* src/MetalinkParserStateV3Impl.cc
	* src/MetalinkParserStateV4Impl.cc
	* src/MultiDiskAdaptor.cc
	* src/MultiUrlRequestInfo.cc
	* src/OptionParser.cc
	* src/PeerSessionResource.cc
	* src/PortEventPoll.cc
	* src/Request.cc
	* src/RequestGroupMan.cc
	* src/SelectEventPoll.cc
	* src/SessionSerializer.cc
	* src/SimpleLogFormatter.cc
	* src/Sqlite3CookieParser.cc
	* src/TrackerWatcherCommand.cc
	* src/XML2SAXMetalinkProcessor.cc
	* src/Xml2XmlRpcRequestProcessor.cc
	* src/XmlRpcMethod.cc
	* src/XmlRpcMethodImpl.cc
	* src/XmlRpcResponse.cc
	* src/base32.cc
	* src/bencode2.cc
	* src/bittorrent_helper.cc
	* src/download_helper.cc
	* src/main.cc
	* src/messageDigest.cc
	* src/option_processing.cc
	* src/util.cc
	* test/AnnounceListTest.cc
	* test/BtRegistryTest.cc
	* test/DHTBucketTest.cc
	* test/DHTRoutingTableTest.cc
	* test/DefaultBtAnnounceTest.cc
	* test/FileEntryTest.cc
	* test/FtpConnectionTest.cc
	* test/MSEHandshakeTest.cc
	* test/MagnetTest.cc
	* test/XmlRpcMethodTest.cc
	* test/array_funTest.cc
This commit is contained in:
Tatsuhiro Tsujikawa 2010-10-30 16:02:15 +00:00
parent 6ecfa4aad1
commit 236e64cb25
64 changed files with 667 additions and 278 deletions

View file

@ -72,16 +72,22 @@ void array_funTest::testArrayLength()
CPPUNIT_ASSERT_EQUAL((size_t)0, A2_ARRAY_LEN(zeroLengthArray));
}
namespace {
// Check operator[] in const context.
static void arrayPtrConst(const array_ptr<struct array_funTest::X>& ax)
void arrayPtrConst(const array_ptr<struct array_funTest::X>& ax)
{
CPPUNIT_ASSERT_EQUAL(100, ax[3].m);
CPPUNIT_ASSERT_EQUAL(99, ax[2].m);
}
} // namespace
static void arrayPtrCast(struct array_funTest::X* x) {}
namespace {
void arrayPtrCast(struct array_funTest::X* x) {}
} // namespace
static void arrayPtrConstCast(const struct array_funTest::X* x) {}
namespace {
void arrayPtrConstCast(const struct array_funTest::X* x) {}
} // namespace
void array_funTest::testArrayPtr()
{
@ -96,10 +102,12 @@ void array_funTest::testArrayPtr()
arrayPtrConstCast(ax);
}
static void arrayWrapperConst(const array_wrapper<int, 10>& array)
namespace {
void arrayWrapperConst(const array_wrapper<int, 10>& array)
{
CPPUNIT_ASSERT_EQUAL(9, array[9]);
}
} // namespace
void array_funTest::testArrayWrapper()
{