summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2024-11-14 19:02:57 +0000
committerJulian Andres Klode <jak@debian.org>2024-11-14 19:02:57 +0000
commit4f0f7d2ba3ec25068e5cfe72bf403b1966a21dbf (patch)
tree2e90507471591b5507ad1376159ec140898e1c0f
parent6ee247f4e5130a348c46ed385a0f405f32cc92d4 (diff)
parent323fcee3730fc8e3edd555f458bf260382f6d3ef (diff)
Merge branch 'noref' into 'main'
std::string_view const & -> std::string_view See merge request apt-team/apt!397
-rw-r--r--apt-pkg/pkgcachegen.cc4
-rw-r--r--apt-pkg/pkgcachegen.h22
-rw-r--r--ftparchive/override.cc4
-rw-r--r--ftparchive/override.h6
-rw-r--r--ftparchive/writer.cc2
-rw-r--r--ftparchive/writer.h2
6 files changed, 20 insertions, 20 deletions
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc
index ab697fbce..aaa969a8d 100644
--- a/apt-pkg/pkgcachegen.cc
+++ b/apt-pkg/pkgcachegen.cc
@@ -370,7 +370,7 @@ bool pkgCacheGenerator::MergeListPackage(ListParser &List, pkgCache::PkgIterator
/*}}}*/
// CacheGenerator::MergeListVersion /*{{{*/
bool pkgCacheGenerator::MergeListVersion(ListParser &List, pkgCache::PkgIterator &Pkg,
- std::string_view const &Version, pkgCache::VerIterator* &OutVer)
+ std::string_view Version, pkgCache::VerIterator* &OutVer)
{
pkgCache::VerIterator Ver = Pkg.VersionList();
Dynamic<pkgCache::VerIterator> DynVer(Ver);
@@ -866,7 +866,7 @@ bool pkgCacheGenerator::NewFileVer(pkgCache::VerIterator &Ver,
// ---------------------------------------------------------------------
/* This puts a version structure in the linked list */
map_pointer<pkgCache::Version> pkgCacheGenerator::NewVersion(pkgCache::VerIterator &Ver,
- std::string_view const &VerStr,
+ std::string_view VerStr,
map_pointer<pkgCache::Package> const ParentPkg,
uint32_t Hash,
map_pointer<pkgCache::Version> const Next)
diff --git a/apt-pkg/pkgcachegen.h b/apt-pkg/pkgcachegen.h
index 3c0295220..efcaef80d 100644
--- a/apt-pkg/pkgcachegen.h
+++ b/apt-pkg/pkgcachegen.h
@@ -1,18 +1,18 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
/* ######################################################################
-
+
Package Cache Generator - Generator for the cache structure.
-
- This builds the cache structure from the abstract package list parser.
+
+ This builds the cache structure from the abstract package list parser.
Each archive source has it's own list parser that is instantiated by
- the caller to provide data for the generator.
-
+ the caller to provide data for the generator.
+
Parts of the cache are created by this generator class while other
parts are created by the list parser. The list parser is responsible
for creating version, depends and provides structures, and some of
their contents
-
+
##################################################################### */
/*}}}*/
#ifndef PKGLIB_PKGCACHEGEN_H
@@ -116,7 +116,7 @@ class APT_HIDDEN pkgCacheGenerator /*{{{*/
bool NewGroup(pkgCache::GrpIterator &Grp, std::string_view Name);
bool NewPackage(pkgCache::PkgIterator &Pkg, std::string_view Name, std::string_view Arch);
- map_pointer<pkgCache::Version> NewVersion(pkgCache::VerIterator &Ver, std::string_view const &VerStr,
+ map_pointer<pkgCache::Version> NewVersion(pkgCache::VerIterator &Ver, std::string_view VerStr,
map_pointer<pkgCache::Package> const ParentPkg, uint32_t Hash,
map_pointer<pkgCache::Version> const Next);
map_pointer<pkgCache::Description> NewDescription(pkgCache::DescIterator &Desc,const std::string &Lang, std::string_view md5sum,map_stringitem_t const idxmd5str);
@@ -162,7 +162,7 @@ class APT_HIDDEN pkgCacheGenerator /*{{{*/
APT_HIDDEN bool MergeListGroup(ListParser &List, std::string const &GrpName);
APT_HIDDEN bool MergeListPackage(ListParser &List, pkgCache::PkgIterator &Pkg);
APT_HIDDEN bool MergeListVersion(ListParser &List, pkgCache::PkgIterator &Pkg,
- std::string_view const &Version, pkgCache::VerIterator* &OutVer);
+ std::string_view Version, pkgCache::VerIterator* &OutVer);
APT_HIDDEN bool AddImplicitDepends(pkgCache::GrpIterator &G, pkgCache::PkgIterator &P,
pkgCache::VerIterator &V);
@@ -200,7 +200,7 @@ class APT_HIDDEN pkgCacheListParser
bool NewProvidesAllArch(pkgCache::VerIterator &Ver, std::string_view Package,
std::string_view Version, uint8_t const Flags);
public:
-
+
// These all operate against the current section
virtual std::string Package() = 0;
virtual bool ArchitectureAll() = 0;
@@ -220,9 +220,9 @@ class APT_HIDDEN pkgCacheListParser
pkgCache::VerIterator &Ver) = 0;
virtual map_filesize_t Offset() = 0;
virtual map_filesize_t Size() = 0;
-
+
virtual bool Step() = 0;
-
+
virtual bool CollectFileProvides(pkgCache &/*Cache*/,
pkgCache::VerIterator &/*Ver*/) {return true;};
diff --git a/ftparchive/override.cc b/ftparchive/override.cc
index ad5578966..02d1566c8 100644
--- a/ftparchive/override.cc
+++ b/ftparchive/override.cc
@@ -208,7 +208,7 @@ bool Override::ReadExtraOverride(string const &File,bool const &/*Source*/)
/* Returns a override item for the given package and the given architecture.
* Treats "all" special
*/
-Override::Item* Override::GetItem(std::string_view const &Package, std::string_view const &Architecture)
+Override::Item* Override::GetItem(std::string_view Package, std::string_view Architecture)
{
map<string,Item>::const_iterator I = Mapping.find(Package);
map<string,Item>::iterator J = Mapping.find(std::string{Package}.append("/").append(Architecture));
@@ -246,7 +246,7 @@ Override::Item* Override::GetItem(std::string_view const &Package, std::string_v
there is a rule but it does not match then the empty string is returned,
also if there was no rewrite rule the empty string is returned. Failed
indicates if there was some kind of problem while rewriting. */
-string Override::Item::SwapMaint(std::string_view const &Orig,bool &Failed)
+string Override::Item::SwapMaint(std::string_view Orig,bool &Failed)
{
Failed = false;
diff --git a/ftparchive/override.h b/ftparchive/override.h
index f57c71df9..ea3b5b9c6 100644
--- a/ftparchive/override.h
+++ b/ftparchive/override.h
@@ -28,17 +28,17 @@ class Override
string NewMaint;
map<string,string> FieldOverride;
- string SwapMaint(std::string_view const &Orig,bool &Failed);
+ string SwapMaint(std::string_view Orig,bool &Failed);
~Item() {};
};
map<string,Item,std::less<>> Mapping;
- inline Item *GetItem(std::string_view const &Package)
+ inline Item *GetItem(std::string_view Package)
{
return GetItem(Package, "");
}
- Item *GetItem(std::string_view const &Package, std::string_view const &Architecture);
+ Item *GetItem(std::string_view Package, std::string_view Architecture);
bool ReadOverride(string const &File,bool const &Source = false);
bool ReadExtraOverride(string const &File,bool const &Source = false);
diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc
index dcae84b86..a5b889c15 100644
--- a/ftparchive/writer.cc
+++ b/ftparchive/writer.cc
@@ -549,7 +549,7 @@ TranslationWriter::TranslationWriter(string const &File, string const &TransComp
// TranslationWriter::DoPackage - Process a single package /*{{{*/
// ---------------------------------------------------------------------
/* Create a Translation-Master file for this Packages file */
-bool TranslationWriter::DoPackage(string_view const &Pkg, string const &Desc,
+bool TranslationWriter::DoPackage(string_view Pkg, string const &Desc,
string const &MD5)
{
if (Output == NULL)
diff --git a/ftparchive/writer.h b/ftparchive/writer.h
index a366233ab..cadddc2b9 100644
--- a/ftparchive/writer.h
+++ b/ftparchive/writer.h
@@ -95,7 +95,7 @@ class TranslationWriter
FileFd *Output;
public:
- bool DoPackage(std::string_view const &Pkg, string const &Desc, string const &MD5);
+ bool DoPackage(std::string_view Pkg, string const &Desc, string const &MD5);
TranslationWriter(string const &File, string const &TransCompress, mode_t const &Permissions);
~TranslationWriter();