diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2019-11-06 17:30:48 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2019-11-07 10:12:35 +0100 |
commit | 04bf9acd22c5e3f399f66d7edb0863e8394e542e (patch) | |
tree | b4507e70c1aa3d932622a5511b4e52069e976c20 /src/libstore | |
parent | f5b7991e59d8c9ae38fb4c9074a5847942caab73 (diff) |
Remove #include
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/download.cc | 4 | ||||
-rw-r--r-- | src/libstore/download.hh | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/libstore/download.cc b/src/libstore/download.cc index cdf56e09d..8fe278d02 100644 --- a/src/libstore/download.cc +++ b/src/libstore/download.cc @@ -34,6 +34,10 @@ DownloadSettings downloadSettings; static GlobalConfig::Register r1(&downloadSettings); +CachedDownloadRequest::CachedDownloadRequest(const std::string & uri) + : uri(uri), ttl(settings.tarballTtl) +{ } + std::string resolveUri(const std::string & uri) { if (uri.compare(0, 8, "channel:") == 0) diff --git a/src/libstore/download.hh b/src/libstore/download.hh index 68565bf46..5a131c704 100644 --- a/src/libstore/download.hh +++ b/src/libstore/download.hh @@ -2,7 +2,7 @@ #include "types.hh" #include "hash.hh" -#include "globals.hh" +#include "config.hh" #include <string> #include <future> @@ -71,10 +71,10 @@ struct CachedDownloadRequest bool unpack = false; std::string name; Hash expectedHash; - unsigned int ttl = settings.tarballTtl; + unsigned int ttl; - CachedDownloadRequest(const std::string & uri) - : uri(uri) { } + CachedDownloadRequest(const std::string & uri); + CachedDownloadRequest() = delete; }; struct CachedDownloadResult |