diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-06-26 21:45:29 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-06-26 21:45:29 +0900 |
| commit | d485c8e76758c68ce55e9554d339eaf715ae7bca (patch) | |
| tree | 51ecc085110b4598159f980105f51eb87eaeceb0 /src/NetrcAuthResolver.h | |
| parent | a4cf50914dc5c5ca1a363b9f63a34eeb3c17cee4 (diff) | |
Rewrite AuthConfig objects using std::unique_ptr
Diffstat (limited to 'src/NetrcAuthResolver.h')
| -rw-r--r-- | src/NetrcAuthResolver.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/NetrcAuthResolver.h b/src/NetrcAuthResolver.h index a92b5dff..d9b74acd 100644 --- a/src/NetrcAuthResolver.h +++ b/src/NetrcAuthResolver.h @@ -43,24 +43,19 @@ class Netrc; class NetrcAuthResolver : public AbstractAuthResolver { private: - std::shared_ptr<Netrc> netrc_; + Netrc* netrc_; bool ignoreDefault_; - std::shared_ptr<AuthConfig> findNetrcAuthenticator + std::unique_ptr<AuthConfig> findNetrcAuthenticator (const std::string& hostname) const; public: NetrcAuthResolver(); - virtual std::shared_ptr<AuthConfig> resolveAuthConfig + virtual std::unique_ptr<AuthConfig> resolveAuthConfig (const std::string& hostname); - void setNetrc(const std::shared_ptr<Netrc>& netrc); - - const std::shared_ptr<Netrc>& getNetrc() const - { - return netrc_; - } + void setNetrc(Netrc* netrc); // Ignores default token of netrc void ignoreDefault(); |
