diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-09-29 12:55:06 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-09-29 12:55:06 +0200 |
commit | de86abbf3f9f0d18f7506b1d50072597786332ea (patch) | |
tree | d1c2d9699ef72ed0f2ab009ce4aabb287d5fa727 /src | |
parent | cebd2fc35de5f6d863ac6606e4d6cf320d96daf5 (diff) |
Cleanup
Diffstat (limited to 'src')
-rw-r--r-- | src/libfetchers/github.cc | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/libfetchers/github.cc b/src/libfetchers/github.cc index 7bf155c69..3734c4278 100644 --- a/src/libfetchers/github.cc +++ b/src/libfetchers/github.cc @@ -14,12 +14,6 @@ struct DownloadUrl { std::string url; std::optional<std::pair<std::string, std::string>> access_token_header; - - DownloadUrl(const std::string & url) - : url(url) { } - - DownloadUrl(const std::string & url, const std::pair<std::string, std::string> & access_token_header) - : url(url), access_token_header(access_token_header) { } }; // A github or gitlab host @@ -239,9 +233,9 @@ struct GitHubInputScheme : GitArchiveInputScheme std::string accessToken = settings.githubAccessToken.get(); if (accessToken != "") { auto auth_header = accessHeaderFromToken(accessToken); - return DownloadUrl(url, auth_header); + return DownloadUrl { url, auth_header }; } else { - return DownloadUrl(url); + return DownloadUrl { url }; } } @@ -294,9 +288,9 @@ struct GitLabInputScheme : GitArchiveInputScheme std::string accessToken = settings.gitlabAccessToken.get(); if (accessToken != "") { auto auth_header = accessHeaderFromToken(accessToken); - return DownloadUrl(url, auth_header); + return DownloadUrl { url, auth_header }; } else { - return DownloadUrl(url); + return DownloadUrl { url }; } } |