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

Added '// namespace' after end of unnamed namespace.
	* src/AbstractCommand.cc
	* src/AnnounceList.cc
	* src/BtSeederStateChoke.cc
	* src/ConsoleStatCalc.cc
	* src/CookieStorage.cc
	* src/DHTBucket.cc
	* src/DHTPeerAnnounceEntry.cc
	* src/DHTPeerAnnounceStorage.cc
	* src/DHTTaskQueueImpl.cc
	* src/DefaultBtMessageDispatcher.cc
	* src/DefaultBtRequestFactory.cc
	* src/DefaultPeerStorage.cc
	* src/DefaultPieceStorage.cc
	* src/ExpatMetalinkProcessor.cc
	* src/ExpatXmlRpcRequestProcessor.cc
	* src/FeedbackURISelector.cc
	* src/FileEntry.cc
	* src/GZipEncoder.cc
	* src/Metalink2RequestGroup.cc
	* src/MetalinkEntry.cc
	* src/MetalinkParserStateV3Impl.cc
	* src/MetalinkParserStateV4Impl.cc
	* src/Metalinker.cc
	* src/MultiDiskAdaptor.cc
	* src/Netrc.cc
	* src/NsCookieParser.cc
	* src/OptionParser.cc
	* src/PieceStatMan.cc
	* src/RarestPieceSelector.cc
	* src/RequestGroupMan.cc
	* src/SegmentMan.cc
	* src/ServerStatMan.cc
	* src/SocketCore.cc
	* src/XML2SAXMetalinkProcessor.cc
	* src/Xml2XmlRpcRequestProcessor.cc
	* src/XmlRpcMethodImpl.cc
	* src/cookie_helper.cc
	* src/download_helper.cc
	* src/messageDigest.cc
	* src/util.cc
pull/1/head
Tatsuhiro Tsujikawa 2010-10-30 14:53:40 +00:00
parent e5d1b812c8
commit 6ecfa4aad1
41 changed files with 117 additions and 73 deletions

View File

@ -1,3 +1,47 @@
2010-10-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added '// namespace' after end of unnamed namespace.
* src/AbstractCommand.cc
* src/AnnounceList.cc
* src/BtSeederStateChoke.cc
* src/ConsoleStatCalc.cc
* src/CookieStorage.cc
* src/DHTBucket.cc
* src/DHTPeerAnnounceEntry.cc
* src/DHTPeerAnnounceStorage.cc
* src/DHTTaskQueueImpl.cc
* src/DefaultBtMessageDispatcher.cc
* src/DefaultBtRequestFactory.cc
* src/DefaultPeerStorage.cc
* src/DefaultPieceStorage.cc
* src/ExpatMetalinkProcessor.cc
* src/ExpatXmlRpcRequestProcessor.cc
* src/FeedbackURISelector.cc
* src/FileEntry.cc
* src/GZipEncoder.cc
* src/Metalink2RequestGroup.cc
* src/MetalinkEntry.cc
* src/MetalinkParserStateV3Impl.cc
* src/MetalinkParserStateV4Impl.cc
* src/Metalinker.cc
* src/MultiDiskAdaptor.cc
* src/Netrc.cc
* src/NsCookieParser.cc
* src/OptionParser.cc
* src/PieceStatMan.cc
* src/RarestPieceSelector.cc
* src/RequestGroupMan.cc
* src/SegmentMan.cc
* src/ServerStatMan.cc
* src/SocketCore.cc
* src/XML2SAXMetalinkProcessor.cc
* src/Xml2XmlRpcRequestProcessor.cc
* src/XmlRpcMethodImpl.cc
* src/cookie_helper.cc
* src/download_helper.cc
* src/messageDigest.cc
* src/util.cc
2010-10-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 2010-10-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed unnecessary unnamed namespace Removed unnecessary unnamed namespace

View File

@ -574,7 +574,7 @@ public:
} }
} }
}; };
} } // namespace
static bool inNoProxy(const SharedHandle<Request>& req, static bool inNoProxy(const SharedHandle<Request>& req,
const std::string& noProxy) const std::string& noProxy)

View File

@ -175,7 +175,7 @@ public:
} }
} }
}; };
} } // namespace
namespace { namespace {
class FindCompletedAllowedTier { class FindCompletedAllowedTier {
@ -190,7 +190,7 @@ public:
} }
} }
}; };
} } // namespace
size_t AnnounceList::countStoppedAllowedTier() const { size_t AnnounceList::countStoppedAllowedTier() const {
return count_if(tiers_.begin(), tiers_.end(), FindStoppedAllowedTier()); return count_if(tiers_.begin(), tiers_.end(), FindStoppedAllowedTier());

View File

@ -124,7 +124,7 @@ public:
peer->chokingRequired(true); peer->chokingRequired(true);
} }
}; };
} } // namespace
void void
BtSeederStateChoke::executeChoke BtSeederStateChoke::executeChoke

View File

@ -174,7 +174,7 @@ public:
<< std::setfill(SEP_CHAR) << std::setw(cols_) << SEP_CHAR << "\n"; << std::setfill(SEP_CHAR) << std::setw(cols_) << SEP_CHAR << "\n";
} }
}; };
} } // namespace
static void printProgressSummary static void printProgressSummary
(const std::deque<SharedHandle<RequestGroup> >& groups, size_t cols, (const std::deque<SharedHandle<RequestGroup> >& groups, size_t cols,

View File

@ -180,7 +180,7 @@ public:
return cookiePathDivider.cookie_; return cookiePathDivider.cookie_;
} }
}; };
} } // namespace
namespace { namespace {
class OrderByPathDepthDesc:public std::binary_function<Cookie, Cookie, bool> { class OrderByPathDepthDesc:public std::binary_function<Cookie, Cookie, bool> {
@ -209,7 +209,7 @@ public:
lhs.cookie_.getCreationTime() < rhs.cookie_.getCreationTime()); lhs.cookie_.getCreationTime() < rhs.cookie_.getCreationTime());
} }
}; };
} } // namespace
namespace { namespace {
template<typename DomainInputIterator, typename CookieOutputIterator> template<typename DomainInputIterator, typename CookieOutputIterator>
@ -228,7 +228,7 @@ void searchCookieByDomainSuffix
(*i).findCookie(out, requestHost, requestPath, now, secure); (*i).findCookie(out, requestHost, requestPath, now, secure);
} }
} }
} } // namespace
bool CookieStorage::contains(const Cookie& cookie) const bool CookieStorage::contains(const Cookie& cookie) const
{ {

View File

@ -266,7 +266,7 @@ public:
return node->isQuestionable(); return node->isQuestionable();
} }
}; };
} } // namespace
bool DHTBucket::containsQuestionableNode() const bool DHTBucket::containsQuestionableNode() const
{ {

View File

@ -82,7 +82,7 @@ public:
} }
} }
}; };
} } // namespace
void DHTPeerAnnounceEntry::removeStalePeerAddrEntry(time_t timeout) void DHTPeerAnnounceEntry::removeStalePeerAddrEntry(time_t timeout)
{ {

View File

@ -66,7 +66,7 @@ public:
return memcmp(lhs->getInfoHash(), rhs->getInfoHash(), DHT_ID_LENGTH) < 0; return memcmp(lhs->getInfoHash(), rhs->getInfoHash(), DHT_ID_LENGTH) < 0;
} }
}; };
} } // namespace
SharedHandle<DHTPeerAnnounceEntry> SharedHandle<DHTPeerAnnounceEntry>
DHTPeerAnnounceStorage::getPeerAnnounceEntry(const unsigned char* infoHash) DHTPeerAnnounceStorage::getPeerAnnounceEntry(const unsigned char* infoHash)
@ -127,7 +127,7 @@ public:
e->removeStalePeerAddrEntry(DHT_PEER_ANNOUNCE_PURGE_INTERVAL); e->removeStalePeerAddrEntry(DHT_PEER_ANNOUNCE_PURGE_INTERVAL);
} }
}; };
} } // namespace
void DHTPeerAnnounceStorage::handleTimeout() void DHTPeerAnnounceStorage::handleTimeout()
{ {

View File

@ -41,7 +41,7 @@ namespace aria2 {
namespace { namespace {
const size_t NUM_CONCURRENT_TASK = 5; const size_t NUM_CONCURRENT_TASK = 5;
} } // namespace
DHTTaskQueueImpl::DHTTaskQueueImpl(): DHTTaskQueueImpl::DHTTaskQueueImpl():
periodicTaskQueue1_(NUM_CONCURRENT_TASK), periodicTaskQueue1_(NUM_CONCURRENT_TASK),

View File

@ -164,7 +164,7 @@ public:
piece_->cancelBlock(slot.getBlockIndex()); piece_->cancelBlock(slot.getBlockIndex());
} }
}; };
} } // namespace
// localhost cancels outstanding download requests to the peer. // localhost cancels outstanding download requests to the peer.
void DefaultBtMessageDispatcher::doAbortOutstandingRequestAction void DefaultBtMessageDispatcher::doAbortOutstandingRequestAction
@ -220,7 +220,7 @@ public:
} }
}; };
} } // namespace
namespace { namespace {
class FindChokedRequestSlot { class FindChokedRequestSlot {
@ -235,7 +235,7 @@ public:
return !peer_->isInPeerAllowedIndexSet(slot.getIndex()); return !peer_->isInPeerAllowedIndexSet(slot.getIndex());
} }
}; };
} } // namespace
// localhost received choke message from the peer. // localhost received choke message from the peer.
void DefaultBtMessageDispatcher::doChokedAction() void DefaultBtMessageDispatcher::doChokedAction()
@ -310,7 +310,7 @@ public:
} }
} }
}; };
} } // namespace
namespace { namespace {
class FindStaleRequestSlot { class FindStaleRequestSlot {
@ -336,7 +336,7 @@ public:
} }
} }
}; };
} } // namespace
void DefaultBtMessageDispatcher::checkRequestSlotAndDoNecessaryThing() void DefaultBtMessageDispatcher::checkRequestSlotAndDoNecessaryThing()
{ {
@ -374,7 +374,7 @@ public:
} }
} }
}; };
} } // namespace
bool DefaultBtMessageDispatcher::isOutstandingRequest bool DefaultBtMessageDispatcher::isOutstandingRequest
(size_t index, size_t blockIndex) { (size_t index, size_t blockIndex) {

View File

@ -86,7 +86,7 @@ public:
} }
} }
}; };
} } // namespace
void DefaultBtRequestFactory::removeCompletedPiece() { void DefaultBtRequestFactory::removeCompletedPiece() {
std::for_each(pieces_.begin(), pieces_.end(), std::for_each(pieces_.begin(), pieces_.end(),
@ -123,7 +123,7 @@ public:
} }
} }
}; };
} } // namespace
namespace { namespace {
class FindChokedPiece { class FindChokedPiece {
@ -137,7 +137,7 @@ public:
return !peer_->isInPeerAllowedIndexSet(piece->getIndex()); return !peer_->isInPeerAllowedIndexSet(piece->getIndex());
} }
}; };
} } // namespace
void DefaultBtRequestFactory::doChokedAction() void DefaultBtRequestFactory::doChokedAction()
{ {
@ -252,7 +252,7 @@ public:
numMissingBlock_ += piece->countMissingBlock(); numMissingBlock_ += piece->countMissingBlock();
} }
}; };
} } // namespace
size_t DefaultBtRequestFactory::countMissingBlock() size_t DefaultBtRequestFactory::countMissingBlock()
{ {

View File

@ -78,7 +78,7 @@ public:
(peer_->getPort() == peer->getPort())); (peer_->getPort() == peer->getPort()));
} }
}; };
} } // namespace
bool DefaultPeerStorage::isPeerAlreadyAdded(const SharedHandle<Peer>& peer) bool DefaultPeerStorage::isPeerAlreadyAdded(const SharedHandle<Peer>& peer)
{ {
@ -151,7 +151,7 @@ public:
return peer->unused() && peer->isGood(); return peer->unused() && peer->isGood();
} }
}; };
} } // namespace
SharedHandle<Peer> DefaultPeerStorage::getUnusedPeer() { SharedHandle<Peer> DefaultPeerStorage::getUnusedPeer() {
std::deque<SharedHandle<Peer> >::const_iterator itr = std::deque<SharedHandle<Peer> >::const_iterator itr =
@ -176,7 +176,7 @@ public:
return ipaddr == peer->getIPAddress() && port == peer->getPort(); return ipaddr == peer->getIPAddress() && port == peer->getPort();
} }
}; };
} } // namespace
SharedHandle<Peer> DefaultPeerStorage::getPeer(const std::string& ipaddr, SharedHandle<Peer> DefaultPeerStorage::getPeer(const std::string& ipaddr,
uint16_t port) const { uint16_t port) const {
@ -212,7 +212,7 @@ public:
} }
} }
}; };
} } // namespace
void DefaultPeerStorage::getActivePeers void DefaultPeerStorage::getActivePeers
(std::vector<SharedHandle<Peer> >& activePeers) (std::vector<SharedHandle<Peer> >& activePeers)

View File

@ -659,7 +659,7 @@ public:
} }
} }
}; };
} } // namespace
void DefaultPieceStorage::removeAdvertisedPiece(time_t elapsed) void DefaultPieceStorage::removeAdvertisedPiece(time_t elapsed)
{ {

View File

@ -58,7 +58,7 @@ public:
SessionData(const SharedHandle<MetalinkParserStateMachine>& stm):stm_(stm) {} SessionData(const SharedHandle<MetalinkParserStateMachine>& stm):stm_(stm) {}
}; };
} } // namespace
static void splitNsName static void splitNsName
(std::string& localname, std::string& prefix, std::string& nsUri, (std::string& localname, std::string& prefix, std::string& nsUri,

View File

@ -55,7 +55,7 @@ struct SessionData {
SessionData(XmlRpcRequestParserStateMachine* stm):stm_(stm) {} SessionData(XmlRpcRequestParserStateMachine* stm):stm_(stm) {}
}; };
} } // namespace
static void mlStartElement(void* userData, const char* name, const char** attrs) static void mlStartElement(void* userData, const char* name, const char** attrs)
{ {

View File

@ -65,7 +65,7 @@ public:
return lhs.first->getDownloadSpeed() > rhs.first->getDownloadSpeed(); return lhs.first->getDownloadSpeed() > rhs.first->getDownloadSpeed();
} }
}; };
} } // namespace
std::string FeedbackURISelector::select std::string FeedbackURISelector::select
(FileEntry* fileEntry, (FileEntry* fileEntry,

View File

@ -221,7 +221,7 @@ public:
lhs->getPeerStat()->getAvgDownloadSpeed() > rhs->getPeerStat()->getAvgDownloadSpeed(); lhs->getPeerStat()->getAvgDownloadSpeed() > rhs->getPeerStat()->getAvgDownloadSpeed();
} }
}; };
} } // namespace
void FileEntry::storePool(const SharedHandle<Request>& request) void FileEntry::storePool(const SharedHandle<Request>& request)
{ {
@ -301,7 +301,7 @@ public:
return uriResult.getResult() == r_; return uriResult.getResult() == r_;
} }
}; };
} } // namespace
void FileEntry::extractURIResult void FileEntry::extractURIResult
(std::deque<URIResult>& res, downloadresultcode::RESULT r) (std::deque<URIResult>& res, downloadresultcode::RESULT r)

View File

@ -44,7 +44,7 @@ namespace aria2 {
namespace { namespace {
const int OUTBUF_LENGTH = 4096; const int OUTBUF_LENGTH = 4096;
} } // namespace
GZipEncoder::GZipEncoder():strm_(0), finished_(false) {} GZipEncoder::GZipEncoder():strm_(0), finished_(false) {}

View File

@ -89,7 +89,7 @@ public:
} }
} }
}; };
} } // namespace
namespace { namespace {
class FindBitTorrentUri { class FindBitTorrentUri {
@ -104,7 +104,7 @@ public:
} }
} }
}; };
} } // namespace
void void
Metalink2RequestGroup::generate Metalink2RequestGroup::generate

View File

@ -77,7 +77,7 @@ public:
} }
} }
}; };
} } // namespace
MetalinkEntry& MetalinkEntry::operator=(const MetalinkEntry& metalinkEntry) MetalinkEntry& MetalinkEntry::operator=(const MetalinkEntry& metalinkEntry)
{ {
@ -129,7 +129,7 @@ public:
} }
} }
}; };
} } // namespace
void MetalinkEntry::setProtocolPriority(const std::string& protocol, void MetalinkEntry::setProtocolPriority(const std::string& protocol,
int priorityToAdd) int priorityToAdd)
@ -148,7 +148,7 @@ public:
return res1->priority < res2->priority; return res1->priority < res2->priority;
} }
}; };
} } // namespace
void MetalinkEntry::reorderResourcesByPriority() { void MetalinkEntry::reorderResourcesByPriority() {
std::random_shuffle(resources.begin(), resources.end(), std::random_shuffle(resources.begin(), resources.end(),
@ -182,7 +182,7 @@ public:
} }
} }
}; };
} } // namespace
void MetalinkEntry::dropUnsupportedResource() { void MetalinkEntry::dropUnsupportedResource() {
resources.erase(std::remove_if(resources.begin(), resources.end(), resources.erase(std::remove_if(resources.begin(), resources.end(),

View File

@ -62,7 +62,7 @@ const std::string SIZE("size");
const std::string TYPE("type"); const std::string TYPE("type");
const std::string URL("url"); const std::string URL("url");
const std::string VERIFICATION("verification"); const std::string VERIFICATION("verification");
} } // namespace
const std::string METALINK3_NAMESPACE_URI("http://www.metalinker.org/"); const std::string METALINK3_NAMESPACE_URI("http://www.metalinker.org/");
@ -79,7 +79,7 @@ public:
(attr.nsUri.empty() || attr.nsUri == METALINK3_NAMESPACE_URI); (attr.nsUri.empty() || attr.nsUri == METALINK3_NAMESPACE_URI);
} }
}; };
} } // namespace
template<typename Container> template<typename Container>
static typename Container::const_iterator findAttr static typename Container::const_iterator findAttr

View File

@ -61,7 +61,7 @@ const std::string SIZE("size");
const std::string TYPE("type"); const std::string TYPE("type");
const std::string MEDIATYPE("mediatype"); const std::string MEDIATYPE("mediatype");
const std::string URL("url"); const std::string URL("url");
} } // namespace
const std::string METALINK4_NAMESPACE_URI("urn:ietf:params:xml:ns:metalink"); const std::string METALINK4_NAMESPACE_URI("urn:ietf:params:xml:ns:metalink");
@ -78,7 +78,7 @@ public:
(attr.nsUri.empty() || attr.nsUri == METALINK4_NAMESPACE_URI); (attr.nsUri.empty() || attr.nsUri == METALINK4_NAMESPACE_URI);
} }
}; };
} } // namespace
template<typename Container> template<typename Container>
static typename Container::const_iterator findAttr static typename Container::const_iterator findAttr

View File

@ -76,7 +76,7 @@ public:
return true; return true;
} }
}; };
} } // namespace
void Metalinker::queryEntry void Metalinker::queryEntry
(std::vector<SharedHandle<MetalinkEntry> >& queryResult, (std::vector<SharedHandle<MetalinkEntry> >& queryResult,

View File

@ -361,7 +361,7 @@ public:
return offset < dwe->getFileEntry()->getOffset(); return offset < dwe->getFileEntry()->getOffset();
} }
}; };
} } // namespace
static DiskWriterEntries::const_iterator static DiskWriterEntries::const_iterator
findFirstDiskWriterEntry findFirstDiskWriterEntry

View File

@ -162,7 +162,7 @@ public:
return authenticator->match(hostname); return authenticator->match(hostname);
} }
}; };
} } // namespace
SharedHandle<Authenticator> SharedHandle<Authenticator>
Netrc::findAuthenticator(const std::string& hostname) const Netrc::findAuthenticator(const std::string& hostname) const

View File

@ -52,7 +52,7 @@ NsCookieParser::~NsCookieParser() {}
namespace { namespace {
const std::string C_TRUE("TRUE"); const std::string C_TRUE("TRUE");
} } // namespace
namespace { namespace {
bool parseNsCookie bool parseNsCookie
@ -89,7 +89,7 @@ bool parseNsCookie
cookie.setCreationTime(creationTime); cookie.setCreationTime(creationTime);
return true; return true;
} }
} } // namespace
std::vector<Cookie> NsCookieParser::parse std::vector<Cookie> NsCookieParser::parse
(const std::string& filename, time_t creationTime) (const std::string& filename, time_t creationTime)

View File

@ -191,7 +191,7 @@ public:
return A2STR::NIL; return A2STR::NIL;
} }
}; };
} } // namespace
OptionHandlerHandle OptionParser::getOptionHandlerByName OptionHandlerHandle OptionParser::getOptionHandlerByName
(const std::string& optName) (const std::string& optName)
@ -255,7 +255,7 @@ public:
return !optionHandler->isHidden() && optionHandler->hasTag(tag_); return !optionHandler->isHidden() && optionHandler->hasTag(tag_);
} }
}; };
} } // namespace
std::vector<SharedHandle<OptionHandler> > std::vector<SharedHandle<OptionHandler> >
OptionParser::findByTag(const std::string& tag) const OptionParser::findByTag(const std::string& tag) const
@ -283,7 +283,7 @@ public:
optionHandler->getName().find(substring_) != std::string::npos; optionHandler->getName().find(substring_) != std::string::npos;
} }
}; };
} } // namespace
std::vector<SharedHandle<OptionHandler> > std::vector<SharedHandle<OptionHandler> >
OptionParser::findByNameSubstring(const std::string& substring) const OptionParser::findByNameSubstring(const std::string& substring) const
@ -347,7 +347,7 @@ public:
return !optionHandler->isHidden() && optionHandler->getOptionID() == id_; return !optionHandler->isHidden() && optionHandler->getOptionID() == id_;
} }
}; };
} } // namespace
SharedHandle<OptionHandler> OptionParser::findByID(int id) const SharedHandle<OptionHandler> OptionParser::findByID(int id) const
{ {
@ -369,7 +369,7 @@ public:
optionHandler->getShortName() == shortName_; optionHandler->getShortName() == shortName_;
} }
}; };
} } // namespace
SharedHandle<OptionHandler> OptionParser::findByShortName(char shortName) const SharedHandle<OptionHandler> OptionParser::findByShortName(char shortName) const
{ {

View File

@ -69,7 +69,7 @@ public:
return SharedHandle<PieceStat>(new PieceStat(index_++)); return SharedHandle<PieceStat>(new PieceStat(index_++));
} }
}; };
} } // namespace
PieceStatMan::PieceStatMan(size_t pieceNum, bool randomShuffle): PieceStatMan::PieceStatMan(size_t pieceNum, bool randomShuffle):
pieceStats_(pieceNum), pieceStats_(pieceNum),
@ -106,7 +106,7 @@ public:
return pieceStats_[lhs] < pieceStats_[rhs]; return pieceStats_[lhs] < pieceStats_[rhs];
} }
}; };
} } // namespace
void PieceStatMan::addPieceStats(const unsigned char* bitfield, void PieceStatMan::addPieceStats(const unsigned char* bitfield,
size_t bitfieldLength) size_t bitfieldLength)

View File

@ -61,7 +61,7 @@ public:
return misbitfield_[index/8]&mask; return misbitfield_[index/8]&mask;
} }
}; };
} } // namespace
bool RarestPieceSelector::select bool RarestPieceSelector::select
(size_t& index, const unsigned char* bitfield, size_t nbits) const (size_t& index, const unsigned char* bitfield, size_t nbits) const

View File

@ -367,7 +367,7 @@ public:
} }
} }
}; };
} } // namespace
namespace { namespace {
class CollectServerStat { class CollectServerStat {
@ -411,7 +411,7 @@ public:
} }
} }
}; };
} } // namespace
namespace { namespace {
class FindStoppedRequestGroup { class FindStoppedRequestGroup {
@ -420,7 +420,7 @@ public:
return group->getNumCommand() == 0; return group->getNumCommand() == 0;
} }
}; };
} } // namespace
void RequestGroupMan::updateServerStat() void RequestGroupMan::updateServerStat()
{ {

View File

@ -318,7 +318,7 @@ public:
return segmentEntry->segment->getIndex() == segment_->getIndex(); return segmentEntry->segment->getIndex() == segment_->getIndex();
} }
}; };
} } // namespace
bool SegmentMan::completeSegment bool SegmentMan::completeSegment
(cuid_t cuid, const SharedHandle<Segment>& segment) { (cuid_t cuid, const SharedHandle<Segment>& segment) {
@ -384,7 +384,7 @@ public:
peerStat_->getProtocol() == p->getProtocol(); peerStat_->getProtocol() == p->getProtocol();
} }
}; };
} } // namespace
void SegmentMan::updateFastestPeerStat(const SharedHandle<PeerStat>& peerStat) void SegmentMan::updateFastestPeerStat(const SharedHandle<PeerStat>& peerStat)
{ {
@ -445,7 +445,7 @@ public:
return ps->getSessionDownloadLength()+total; return ps->getSessionDownloadLength()+total;
} }
}; };
} } // namespace
uint64_t SegmentMan::calculateSessionDownloadLength() const uint64_t SegmentMan::calculateSessionDownloadLength() const
{ {

View File

@ -154,7 +154,7 @@ public:
return ss->getLastUpdated().difference(time_) >= timeout_; return ss->getLastUpdated().difference(time_) >= timeout_;
} }
}; };
} } // namespace
void ServerStatMan::removeStaleServerStat(time_t timeout) void ServerStatMan::removeStaleServerStat(time_t timeout)
{ {

View File

@ -1315,7 +1315,7 @@ int getDefaultAIFlags()
return defaultAIFlags; return defaultAIFlags;
} }
} } // namespace
void setDefaultAIFlags(int flags) void setDefaultAIFlags(int flags)
{ {

View File

@ -56,7 +56,7 @@ public:
SessionData(const SharedHandle<MetalinkParserStateMachine>& stm):stm_(stm) {} SessionData(const SharedHandle<MetalinkParserStateMachine>& stm):stm_(stm) {}
}; };
} } // namespace
static void mlStartElement static void mlStartElement
(void* userData, (void* userData,

View File

@ -55,7 +55,7 @@ struct SessionData {
SessionData(XmlRpcRequestParserStateMachine* stm):stm_(stm) {} SessionData(XmlRpcRequestParserStateMachine* stm):stm_(stm) {}
}; };
} } // namespace
static void mlStartElement(void* userData, const xmlChar* name, static void mlStartElement(void* userData, const xmlChar* name,
const xmlChar** attrs) const xmlChar** attrs)

View File

@ -137,7 +137,7 @@ const std::string KEY_COMMENT = "comment";
const std::string KEY_CREATION_DATE = "creationDate"; const std::string KEY_CREATION_DATE = "creationDate";
const std::string KEY_MODE = "mode"; const std::string KEY_MODE = "mode";
const std::string KEY_SERVERS = "servers"; const std::string KEY_SERVERS = "servers";
} } // namespace
static SharedHandle<ValueBase> createGIDResponse(gid_t gid) static SharedHandle<ValueBase> createGIDResponse(gid_t gid)
{ {

View File

@ -63,7 +63,7 @@ std::string::const_iterator getNextDigit
++first); ++first);
return first; return first;
} }
} } // namespace
bool parseDate(time_t& time, const std::string& cookieDate) bool parseDate(time_t& time, const std::string& cookieDate)
{ {

View File

@ -418,7 +418,7 @@ public:
} }
} }
}; };
} } // namespace
namespace { namespace {
class StreamProtocolFilter { class StreamProtocolFilter {
@ -429,7 +429,7 @@ public:
return detector_.isStreamProtocol(uri); return detector_.isStreamProtocol(uri);
} }
}; };
} } // namespace
void createRequestGroupForUri void createRequestGroupForUri
(std::vector<SharedHandle<RequestGroup> >& result, (std::vector<SharedHandle<RequestGroup> >& result,

View File

@ -51,7 +51,7 @@ struct DigestAlgoEntry {
DigestAlgoEntry(const MessageDigestContext::DigestAlgo& algo, int strength): DigestAlgoEntry(const MessageDigestContext::DigestAlgo& algo, int strength):
algo(algo), strength(strength) {} algo(algo), strength(strength) {}
}; };
} } // namespace
typedef std::map<std::string, DigestAlgoEntry> typedef std::map<std::string, DigestAlgoEntry>
DigestAlgoMap; DigestAlgoMap;

View File

@ -266,7 +266,7 @@ bool isUtf8Tail(unsigned char ch)
{ {
return in(ch, 0x80u, 0xbfu); return in(ch, 0x80u, 0xbfu);
} }
} } // namespace
bool isUtf8(const std::string& str) bool isUtf8(const std::string& str)
{ {