summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcachegen.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2016-01-08 00:41:14 +0100
committerJulian Andres Klode <jak@debian.org>2016-01-08 00:41:14 +0100
commitdd592790c8f1be4925f74266742c163516ab80c7 (patch)
tree1db0b274aee9f38d6d04829147805a7e7395e752 /apt-pkg/pkgcachegen.cc
parentc5a858e39f83676fdf16f1bdae5966c96ee882ff (diff)
pkgCacheGenerator: Use StringView for toString
This removes some minor overhead. Gbp-Dch: ignore
Diffstat (limited to 'apt-pkg/pkgcachegen.cc')
-rw-r--r--apt-pkg/pkgcachegen.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc
index db8131651..654c5f279 100644
--- a/apt-pkg/pkgcachegen.cc
+++ b/apt-pkg/pkgcachegen.cc
@@ -514,7 +514,7 @@ bool pkgCacheGenerator::NewGroup(pkgCache::GrpIterator &Grp, StringView Name)
return false;
Grp = pkgCache::GrpIterator(Cache, Cache.GrpP + Group);
- map_stringitem_t const idxName = StoreString(PKGNAME, Name.to_string());
+ map_stringitem_t const idxName = StoreString(PKGNAME, Name);
if (unlikely(idxName == 0))
return false;
Grp->Name = idxName;
@@ -555,7 +555,7 @@ bool pkgCacheGenerator::NewPackage(pkgCache::PkgIterator &Pkg, StringView Name,
APT_IGNORE_DEPRECATED(Pkg->Name = Grp->Name;)
Pkg->Group = Grp.Index();
// all is mapped to the native architecture
- map_stringitem_t const idxArch = (Arch == "all") ? Cache.HeaderP->Architecture : StoreString(MIXED, Arch.to_string());
+ map_stringitem_t const idxArch = (Arch == "all") ? Cache.HeaderP->Architecture : StoreString(MIXED, Arch);
if (unlikely(idxArch == 0))
return false;
Pkg->Arch = idxArch;
@@ -1019,7 +1019,7 @@ bool pkgCacheListParser::NewDepends(pkgCache::VerIterator &Ver,
if (idxVersion == 0)
{
- idxVersion = StoreString(pkgCacheGenerator::VERSIONNUMBER, Version.to_string());
+ idxVersion = StoreString(pkgCacheGenerator::VERSIONNUMBER, Version);
if (unlikely(idxVersion == 0))
return false;
}
@@ -1088,7 +1088,7 @@ bool pkgCacheListParser::NewProvides(pkgCache::VerIterator &Ver,
map_stringitem_t idxProvideVersion = 0;
if (Version.empty() == false) {
- idxProvideVersion = StoreString(pkgCacheGenerator::VERSIONNUMBER, Version.to_string());
+ idxProvideVersion = StoreString(pkgCacheGenerator::VERSIONNUMBER, Version);
if (unlikely(idxProvideVersion == 0))
return false;
}
@@ -1133,7 +1133,7 @@ bool pkgCacheListParser::NewProvidesAllArch(pkgCache::VerIterator &Ver, StringVi
{
map_stringitem_t idxProvideVersion = 0;
if (Version.empty() == false) {
- idxProvideVersion = StoreString(pkgCacheGenerator::VERSIONNUMBER, Version.to_string());
+ idxProvideVersion = StoreString(pkgCacheGenerator::VERSIONNUMBER, Version);
if (unlikely(idxProvideVersion == 0))
return false;
}