summaryrefslogtreecommitdiff
path: root/apt-private/private-cachefile.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-06-19 11:00:02 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2014-09-27 00:09:09 +0200
commitfe86debbae914b51d2799e7b24abfd1f944f8caf (patch)
tree8c97eca81decc53d63f6b74cef78eb3eef29d0cf /apt-private/private-cachefile.cc
parentd36b27305dae21f9b3b6de056853ecd8bbd157e6 (diff)
deprecate Pkg->Name in favor of Grp->Name
They both store the same information, so this field just takes up space in the Package struct for no good reason. We mark it "just" as deprecated instead of instantly removing it though as it isn't misleading like Section was and is potentially used in the wild more often.
Diffstat (limited to 'apt-private/private-cachefile.cc')
-rw-r--r--apt-private/private-cachefile.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/apt-private/private-cachefile.cc b/apt-private/private-cachefile.cc
index 5e955ac39..29e665245 100644
--- a/apt-private/private-cachefile.cc
+++ b/apt-private/private-cachefile.cc
@@ -32,8 +32,10 @@ int CacheFile::NameComp(const void *a,const void *b)
const pkgCache::Package &A = **(pkgCache::Package **)a;
const pkgCache::Package &B = **(pkgCache::Package **)b;
+ const pkgCache::Group * const GA = SortCache->GrpP + A.Group;
+ const pkgCache::Group * const GB = SortCache->GrpP + B.Group;
- return strcmp(SortCache->StrP + A.Name,SortCache->StrP + B.Name);
+ return strcmp(SortCache->StrP + GA->Name,SortCache->StrP + GB->Name);
}
/*}}}*/
// CacheFile::Sort - Sort by name /*{{{*/