diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-07-04 21:33:36 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-07-04 21:33:36 +0900 |
| commit | 107de5899779d4c2eecc86aaf74dc4cec8286293 (patch) | |
| tree | 10be23f5707a8e125ac73048ebc1e97f5569017c /src/AuthConfigFactory.cc | |
| parent | 6ba1725e0f731860f75e67d15e305f35dd0c3d67 (diff) | |
Return nullptr directly where std::unique_ptr is expected
The constructor of std::unique_ptr which takes nullptr is not explicit
so we can return nullptr directly.
Diffstat (limited to 'src/AuthConfigFactory.cc')
| -rw-r--r-- | src/AuthConfigFactory.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/AuthConfigFactory.cc b/src/AuthConfigFactory.cc index 784e9ba4..d0b747d2 100644 --- a/src/AuthConfigFactory.cc +++ b/src/AuthConfigFactory.cc @@ -74,7 +74,7 @@ AuthConfigFactory::createAuthConfig auto i = findBasicCred(request->getHost(), request->getPort(), request->getDir()); if(i == std::end(basicCreds_)) { - return std::unique_ptr<AuthConfig>(); + return nullptr; } else { return AuthConfig::create((*i)->user_, (*i)->password_); } @@ -114,7 +114,7 @@ AuthConfigFactory::createAuthConfig createFtpAuthResolver(op)->resolveAuthConfig(request->getHost()); } } else { - return std::unique_ptr<AuthConfig>(); + return nullptr; } } |
