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 /ftparchive | |
| parent | 384cfa1fe9dfd30b35d6f8b0ae87be643ab75d06 (diff) | |
string{=> _view} flNotDir(string{=> _view}). Configuration::{Cnd,}Set(Value: string{=> _view})
Diffstat (limited to 'ftparchive')
| -rw-r--r-- | ftparchive/writer.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc index 3c5237915..78852e772 100644 --- a/ftparchive/writer.cc +++ b/ftparchive/writer.cc @@ -611,12 +611,12 @@ SourcesWriter::SourcesWriter(FileFd * const GivenOutput, string const &DB, strin // SourcesWriter::DoPackage - Process a single package /*{{{*/ static std::string getDscHash(unsigned int const DoHashes, Hashes::SupportedHashes const DoIt, pkgTagSection &Tags, pkgTagSection::Key const FieldKey, - HashString const * const Hash, unsigned long long Size, std::string const &FileName) + HashString const * const Hash, unsigned long long Size, std::string_view const &FileName) { if ((DoHashes & DoIt) != DoIt || not Tags.Exists(FieldKey) || Hash == nullptr) return ""; std::ostringstream out; - out << "\n " << Hash->HashValue() << " " << std::to_string(Size) << " " << FileName + out << "\n " << Hash->HashValue() << " " << Size << " " << FileName << "\n " << Tags.Find(FieldKey); return out.str(); } @@ -713,7 +713,7 @@ bool SourcesWriter::DoPackage(string FileName) } // Add the dsc to the files hash list - string const strippedName = flNotDir(FileName); + auto const strippedName = flNotDir(FileName); std::string const Files = getDscHash(DoHashes, Hashes::MD5SUM, Tags, pkgTagSection::Key::Files, Db.HashesList.find("MD5Sum"), St.st_size, strippedName); std::string ChecksumsSha1 = getDscHash(DoHashes, Hashes::SHA1SUM, Tags, pkgTagSection::Key::Checksums_Sha1, Db.HashesList.find("SHA1"), St.st_size, strippedName); std::string ChecksumsSha256 = getDscHash(DoHashes, Hashes::SHA256SUM, Tags, pkgTagSection::Key::Checksums_Sha256, Db.HashesList.find("SHA256"), St.st_size, strippedName); |
