From bd65dba7361047ae1048e1b73500ca26b7e96102 Mon Sep 17 00:00:00 2001 From: наб Date: Tue, 12 Nov 2024 17:59:19 +0100 Subject: apt-pkg/deb/debmetaindex.cc: prepare for APT::StringView -> std::string_view --- apt-pkg/deb/debmetaindex.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc index 266313bef..b9369a898 100644 --- a/apt-pkg/deb/debmetaindex.cc +++ b/apt-pkg/deb/debmetaindex.cc @@ -533,7 +533,7 @@ bool debReleaseIndex::Load(std::string const &Filename, std::string * const Erro if (!parseSumData(Start, End, Name, Hash, Size)) return false; - HashString const hs(hashinfo.name.to_string(), Hash); + HashString const hs(std::string{hashinfo.name}, Hash); if (Entries.find(Name) == Entries.end()) { metaIndex::checkSum *Sum = new metaIndex::checkSum; @@ -698,7 +698,7 @@ bool debReleaseIndex::parseSumData(const char *&Start, const char *End, /*{{{*/ Start++; if (Start >= End) return false; - + EntryEnd = Start; /* Find the end of the second entry (the size) */ while ((*EntryEnd != '\t' && *EntryEnd != ' ' ) @@ -706,19 +706,19 @@ bool debReleaseIndex::parseSumData(const char *&Start, const char *End, /*{{{*/ EntryEnd++; if (EntryEnd == End) return false; - + Size = strtoull (Start, NULL, 10); - + /* Skip over intermediate blanks */ Start = EntryEnd; while (*Start == '\t' || *Start == ' ') Start++; if (Start >= End) return false; - + EntryEnd = Start; /* Find the end of the third entry (the filename) */ - while ((*EntryEnd != '\t' && *EntryEnd != ' ' && + while ((*EntryEnd != '\t' && *EntryEnd != ' ' && *EntryEnd != '\n' && *EntryEnd != '\r') && EntryEnd < End) EntryEnd++; @@ -1255,7 +1255,7 @@ class APT_HIDDEN debSLTypeDebian : public pkgSourceList::Type /*{{{*/ } protected: - // This is a duplicate of pkgAcqChangelog::URITemplate() with some changes to work + // This is a duplicate of pkgAcqChangelog::URITemplate() with some changes to work // on metaIndex instead of cache structures, and using Snapshots std::string SnapshotServer(debReleaseIndex const *Rls) const { -- cgit v1.2.3-70-g09d2