From 729a5c8f4fb8c841497d26170e1a47c41617ecd9 Mon Sep 17 00:00:00 2001 From: наб Date: Thu, 23 Jan 2025 20:50:39 +0100 Subject: string{=> _view} flNotDir(string{=> _view}). Configuration::{Cnd,}Set(Value: string{=> _view}) --- methods/http.cc | 2 +- methods/mirror.cc | 4 ++-- methods/store.cc | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'methods') 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 const &baseuris, MirrorListInfo const &info, FetchItem *Itm, std::function 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(); } -- cgit v1.2.3-70-g09d2