diff options
author | Julian Andres Klode <julian.klode@canonical.com> | 2019-04-30 12:32:54 +0200 |
---|---|---|
committer | Julian Andres Klode <julian.klode@canonical.com> | 2019-04-30 17:43:56 +0200 |
commit | af74a9e2d55d6a9532eb3fbb9b96c65b7ddc1e4d (patch) | |
tree | ef6120b02fd07a1edac2c3be30a17a3141adfdc8 /methods/basehttp.cc | |
parent | 85e2c1b4ecbaf975d9d978f01227dc4987ee9d6c (diff) |
apt-pkg: URI: Add 'explicit' to single argument constructor
This needs a fair amount of changes elsewhere in the code,
hence this is separate from the previous commits.
Diffstat (limited to 'methods/basehttp.cc')
-rw-r--r-- | methods/basehttp.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/methods/basehttp.cc b/methods/basehttp.cc index f8dd7c020..04c194ad9 100644 --- a/methods/basehttp.cc +++ b/methods/basehttp.cc @@ -313,7 +313,7 @@ BaseHttpMethod::DealWithHeaders(FetchResult &Res, RequestState &Req) ; else if (Req.Location[0] == '/' && Queue->Uri.empty() == false) { - URI Uri = Queue->Uri; + URI Uri(Queue->Uri); if (Uri.Host.empty() == false) NextURI = URI::SiteOnly(Uri); else @@ -332,7 +332,7 @@ BaseHttpMethod::DealWithHeaders(FetchResult &Res, RequestState &Req) else { NextURI = DeQuoteString(Req.Location); - URI tmpURI = NextURI; + URI tmpURI(NextURI); if (tmpURI.Access.find('+') != std::string::npos) { _error->Error("Server tried to trick us into using a specific implementation: %s", tmpURI.Access.c_str()); @@ -340,7 +340,7 @@ BaseHttpMethod::DealWithHeaders(FetchResult &Res, RequestState &Req) return ERROR_WITH_CONTENT_PAGE; return ERROR_UNRECOVERABLE; } - URI Uri = Queue->Uri; + URI Uri(Queue->Uri); if (Binary.find('+') != std::string::npos) { auto base = Binary.substr(0, Binary.find('+')); @@ -493,7 +493,7 @@ bool BaseHttpMethod::Fetch(FetchItem *) do { // Make sure we stick with the same server - if (Server->Comp(QueueBack->Uri) == false) + if (Server->Comp(URI(QueueBack->Uri)) == false) break; bool const UsableHashes = QueueBack->ExpectedHashes.usable(); @@ -578,14 +578,14 @@ int BaseHttpMethod::Loop() continue; // Connect to the server - if (Server == 0 || Server->Comp(Queue->Uri) == false) + if (Server == 0 || Server->Comp(URI(Queue->Uri)) == false) { if (!Queue->Proxy().empty()) { - URI uri = Queue->Uri; + URI uri(Queue->Uri); _config->Set("Acquire::" + uri.Access + "::proxy::" + uri.Host, Queue->Proxy()); } - Server = CreateServerState(Queue->Uri); + Server = CreateServerState(URI(Queue->Uri)); setPostfixForMethodNames(::URI(Queue->Uri).Host.c_str()); AllowRedirect = ConfigFindB("AllowRedirect", true); PipelineDepth = ConfigFindI("Pipeline-Depth", 10); |