summaryrefslogtreecommitdiff
path: root/methods
diff options
context:
space:
mode:
authorнаб <nabijaczleweli@nabijaczleweli.xyz>2025-01-23 20:50:39 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2025-02-14 19:45:12 +0100
commit729a5c8f4fb8c841497d26170e1a47c41617ecd9 (patch)
tree3d9e97b68a2a9706ce7295e0b056a053449b39cc /methods
parent384cfa1fe9dfd30b35d6f8b0ae87be643ab75d06 (diff)
string{=> _view} flNotDir(string{=> _view}). Configuration::{Cnd,}Set(Value: string{=> _view})
Diffstat (limited to 'methods')
-rw-r--r--methods/http.cc2
-rw-r--r--methods/mirror.cc4
-rw-r--r--methods/store.cc4
3 files changed, 5 insertions, 5 deletions
diff --git a/methods/http.cc b/methods/http.cc
index f2514eb9d..a6d7511fd 100644
--- a/methods/http.cc
+++ b/methods/http.cc
@@ -1045,7 +1045,7 @@ int main(int, const char *argv[])
// ignore SIGPIPE, this can happen on write() if the socket
// closes the connection (this is dealt with via ServerDie())
signal(SIGPIPE, SIG_IGN);
- std::string Binary = flNotDir(argv[0]);
+ std::string Binary{flNotDir(argv[0])};
if (Binary.find('+') == std::string::npos && Binary != "https" && Binary != "http")
Binary.append("+http");
return HttpMethod(std::move(Binary)).Loop();
diff --git a/methods/mirror.cc b/methods/mirror.cc
index dfdd550b7..6da0b4258 100644
--- a/methods/mirror.cc
+++ b/methods/mirror.cc
@@ -97,7 +97,7 @@ class MirrorMethod : public aptMethod /*{{{*/
void DealWithPendingItems(std::vector<std::string> const &baseuris, MirrorListInfo const &info, FetchItem *Itm, std::function<void()> handler);
public:
- explicit MirrorMethod(std::string &&pProg) : aptMethod(std::move(pProg), "2.0", SingleInstance | Pipeline | SendConfig | AuxRequests | SendURIEncoded), genrng(clock())
+ explicit MirrorMethod(std::string pProg) : aptMethod(std::move(pProg), "2.0", SingleInstance | Pipeline | SendConfig | AuxRequests | SendURIEncoded), genrng(clock())
{
SeccompFlags = aptMethod::BASE | aptMethod::DIRECTORY;
}
@@ -417,5 +417,5 @@ bool MirrorMethod::URIAcquire(std::string const &Message, FetchItem *Itm) /*{{{*
int main(int, const char *argv[])
{
- return MirrorMethod(flNotDir(argv[0])).Run();
+ return MirrorMethod(std::string{flNotDir(argv[0])}).Run();
}
diff --git a/methods/store.cc b/methods/store.cc
index bfd748e23..14fadabac 100644
--- a/methods/store.cc
+++ b/methods/store.cc
@@ -37,7 +37,7 @@ class StoreMethod final : public aptMethod
public:
- explicit StoreMethod(std::string &&pProg) : aptMethod(std::move(pProg),"1.2",SingleInstance | SendConfig | SendURIEncoded)
+ explicit StoreMethod(std::string pProg) : aptMethod(std::move(pProg),"1.2",SingleInstance | SendConfig | SendURIEncoded)
{
SeccompFlags = aptMethod::BASE;
if (Binary != "store")
@@ -144,5 +144,5 @@ bool StoreMethod::Fetch(FetchItem *Itm) /*{{{*/
int main(int, char *argv[])
{
- return StoreMethod(flNotDir(argv[0])).Run();
+ return StoreMethod(std::string{flNotDir(argv[0])}).Run();
}