From c342bde9627b434effbc0cd10b817670d1da0923 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 28 Feb 2010 12:30:11 +0000 Subject: 2010-02-28 Tatsuhiro Tsujikawa Use vector instead of deque for containers which is used for mostly read-only purpose. --- src/NetrcAuthResolver.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/NetrcAuthResolver.cc') diff --git a/src/NetrcAuthResolver.cc b/src/NetrcAuthResolver.cc index 110c64be..2a3fbae4 100644 --- a/src/NetrcAuthResolver.cc +++ b/src/NetrcAuthResolver.cc @@ -40,7 +40,8 @@ namespace aria2 { NetrcAuthResolver::NetrcAuthResolver():_ignoreDefault(false) {} -AuthConfigHandle NetrcAuthResolver::resolveAuthConfig(const std::string& hostname) +SharedHandle +NetrcAuthResolver::resolveAuthConfig(const std::string& hostname) { if(_userDefinedAuthConfig.isNull()) { return findNetrcAuthenticator(hostname); @@ -49,12 +50,13 @@ AuthConfigHandle NetrcAuthResolver::resolveAuthConfig(const std::string& hostnam } } -AuthConfigHandle NetrcAuthResolver::findNetrcAuthenticator(const std::string& hostname) const +SharedHandle +NetrcAuthResolver::findNetrcAuthenticator(const std::string& hostname) const { if(_netrc.isNull()) { return _defaultAuthConfig; } else { - AuthenticatorHandle auth = _netrc->findAuthenticator(hostname); + SharedHandle auth = _netrc->findAuthenticator(hostname); if(auth.isNull()) { return _defaultAuthConfig; } else { @@ -68,7 +70,7 @@ AuthConfigHandle NetrcAuthResolver::findNetrcAuthenticator(const std::string& ho } } -void NetrcAuthResolver::setNetrc(const NetrcHandle& netrc) +void NetrcAuthResolver::setNetrc(const SharedHandle& netrc) { _netrc = netrc; } -- cgit