diff options
| author | наб <nabijaczleweli@nabijaczleweli.xyz> | 2025-01-23 20:50:39 +0100 |
|---|---|---|
| committer | Julian Andres Klode <julian.klode@canonical.com> | 2025-02-14 19:45:12 +0100 |
| commit | 729a5c8f4fb8c841497d26170e1a47c41617ecd9 (patch) | |
| tree | 3d9e97b68a2a9706ce7295e0b056a053449b39cc /apt-pkg/sourcelist.cc | |
| parent | 384cfa1fe9dfd30b35d6f8b0ae87be643ab75d06 (diff) | |
string{=> _view} flNotDir(string{=> _view}). Configuration::{Cnd,}Set(Value: string{=> _view})
Diffstat (limited to 'apt-pkg/sourcelist.cc')
| -rw-r--r-- | apt-pkg/sourcelist.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc index 94fe02531..b744da23a 100644 --- a/apt-pkg/sourcelist.cc +++ b/apt-pkg/sourcelist.cc @@ -36,6 +36,7 @@ /*}}}*/ using namespace std; +using namespace std::literals; // Global list of Items supported static pkgSourceList::Type *ItmList[10]; @@ -541,7 +542,7 @@ void pkgSourceList::AddVolatileFile(pkgIndexFile * const File) /*{{{*/ VolatileFiles.push_back(File); } /*}}}*/ -static bool fileNameMatches(std::string const &filename, std::string const &idxtype)/*{{{*/ +static bool fileNameMatches(std::string_view const &filename, std::string const &idxtype)/*{{{*/ { for (auto && type: APT::Configuration::getCompressionTypes()) { @@ -590,9 +591,9 @@ bool pkgSourceList::AddVolatileFile(std::string const &File, std::vector<std::st else { auto const filename = flNotDir(File); - auto const Target = IndexTarget(File, filename, File, "file:" + File, false, true, { + auto const Target = IndexTarget(File, std::string{filename}, File, "file:" + File, false, true, { { "FILENAME", File }, - { "REPO_URI", "file:" + flAbsPath(flNotFile(File)) + '/' }, + { "REPO_URI", ("file:"s += flAbsPath(flNotFile(File))) += '/' }, { "COMPONENT", "volatile-packages-file" }, }); if (fileNameMatches(filename, "Packages")) |
