summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorнаб <nabijaczleweli@nabijaczleweli.xyz>2024-11-12 17:59:21 +0100
committerнаб <nabijaczleweli@nabijaczleweli.xyz>2024-11-12 20:36:16 +0100
commit982998a061461a503352d85b1d0a76a99c8480cd (patch)
treeeeecb3875d06ce7c38bfa07660421095c7dbd775 /apt-pkg
parente1cb4e100320ceb5c81583943f57bcd007a95a7d (diff)
apt-pkg/edsp/edsplistparser.cc: APT::StringView -> std::string_view
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/deb/deblistparser.cc2
-rw-r--r--apt-pkg/deb/deblistparser.h2
-rw-r--r--apt-pkg/edsp/edsplistparser.cc7
-rw-r--r--apt-pkg/edsp/edsplistparser.h5
-rw-r--r--apt-pkg/pkgcachegen.cc4
-rw-r--r--apt-pkg/pkgcachegen.h2
6 files changed, 9 insertions, 13 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index 13e8fd06d..f9835f797 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -280,7 +280,7 @@ std::vector<std::string> debListParser::AvailableDescriptionLanguages()
description. If no Description-md5 is found in the section it will be
calculated.
*/
-APT::StringView debListParser::Description_md5()
+std::string_view debListParser::Description_md5()
{
return Section.Find(pkgTagSection::Key::Description_md5);
}
diff --git a/apt-pkg/deb/deblistparser.h b/apt-pkg/deb/deblistparser.h
index e6767d7d5..1070e806d 100644
--- a/apt-pkg/deb/deblistparser.h
+++ b/apt-pkg/deb/deblistparser.h
@@ -66,7 +66,7 @@ class APT_HIDDEN debListParser : public pkgCacheListParser
virtual APT::StringView Version() APT_OVERRIDE;
virtual bool NewVersion(pkgCache::VerIterator &Ver) APT_OVERRIDE;
virtual std::vector<std::string> AvailableDescriptionLanguages() APT_OVERRIDE;
- virtual APT::StringView Description_md5() APT_OVERRIDE;
+ virtual std::string_view Description_md5() APT_OVERRIDE;
virtual uint32_t VersionHash() APT_OVERRIDE;
virtual bool SameVersion(uint32_t Hash, pkgCache::VerIterator const &Ver) APT_OVERRIDE;
virtual bool UsePackage(pkgCache::PkgIterator &Pkg,
diff --git a/apt-pkg/edsp/edsplistparser.cc b/apt-pkg/edsp/edsplistparser.cc
index 183ace654..d3e761be4 100644
--- a/apt-pkg/edsp/edsplistparser.cc
+++ b/apt-pkg/edsp/edsplistparser.cc
@@ -17,7 +17,6 @@
#include <apt-pkg/fileutl.h>
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/pkgsystem.h>
-#include <apt-pkg/string_view.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/tagfile-keys.h>
#include <apt-pkg/tagfile.h>
@@ -48,7 +47,7 @@ bool edspLikeListParser::NewVersion(pkgCache::VerIterator &Ver)
return false;
// Patch up the source version, it is stored in the Source-Version field in EDSP.
- if (APT::StringView version = Section.Find(pkgTagSection::Key::Source_Version); not version.empty())
+ if (std::string_view version = Section.Find(pkgTagSection::Key::Source_Version); not version.empty())
{
if (version != Ver.VerStr())
{
@@ -67,9 +66,9 @@ std::vector<std::string> edspLikeListParser::AvailableDescriptionLanguages()
{
return {};
}
-APT::StringView edspLikeListParser::Description_md5()
+std::string_view edspLikeListParser::Description_md5()
{
- return APT::StringView();
+ return {};
}
/*}}}*/
// ListParser::VersionHash - Compute a unique hash for this version /*{{{*/
diff --git a/apt-pkg/edsp/edsplistparser.h b/apt-pkg/edsp/edsplistparser.h
index 41bfd1f79..3f0f3e64c 100644
--- a/apt-pkg/edsp/edsplistparser.h
+++ b/apt-pkg/edsp/edsplistparser.h
@@ -18,15 +18,12 @@
#include <string>
-namespace APT {
- class StringView;
-}
class APT_HIDDEN edspLikeListParser : public debListParser
{
public:
virtual bool NewVersion(pkgCache::VerIterator &Ver) APT_OVERRIDE;
virtual std::vector<std::string> AvailableDescriptionLanguages() APT_OVERRIDE;
- virtual APT::StringView Description_md5() APT_OVERRIDE;
+ virtual std::string_view Description_md5() APT_OVERRIDE;
virtual uint32_t VersionHash() APT_OVERRIDE;
explicit edspLikeListParser(FileFd *File);
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc
index 981d360d2..1b629bd46 100644
--- a/apt-pkg/pkgcachegen.cc
+++ b/apt-pkg/pkgcachegen.cc
@@ -339,7 +339,7 @@ bool pkgCacheGenerator::MergeListPackage(ListParser &List, pkgCache::PkgIterator
Pkg.Name(), "UsePackage", 1);
// Find the right version to write the description
- StringView CurMd5 = List.Description_md5();
+ std::string_view CurMd5 = List.Description_md5();
std::vector<std::string> availDesc = List.AvailableDescriptionLanguages();
for (Ver = Pkg.VersionList(); Ver.end() == false; ++Ver)
{
@@ -506,7 +506,7 @@ bool pkgCacheGenerator::MergeListVersion(ListParser &List, pkgCache::PkgIterator
}
/* Record the Description(s) based on their master md5sum */
- StringView CurMd5 = List.Description_md5();
+ std::string_view CurMd5 = List.Description_md5();
/* Before we add a new description we first search in the group for
a version with a description of the same MD5 - if so we reuse this
diff --git a/apt-pkg/pkgcachegen.h b/apt-pkg/pkgcachegen.h
index 420642684..5ac235255 100644
--- a/apt-pkg/pkgcachegen.h
+++ b/apt-pkg/pkgcachegen.h
@@ -209,7 +209,7 @@ class APT_HIDDEN pkgCacheListParser
virtual APT::StringView Version() = 0;
virtual bool NewVersion(pkgCache::VerIterator &Ver) = 0;
virtual std::vector<std::string> AvailableDescriptionLanguages() = 0;
- virtual APT::StringView Description_md5() = 0;
+ virtual std::string_view Description_md5() = 0;
virtual uint32_t VersionHash() = 0;
/** compare currently parsed version with given version
*