summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcachegen.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2015-08-13 11:28:32 +0200
committerJulian Andres Klode <jak@debian.org>2015-08-13 11:31:00 +0200
commit98cc7fd2c1d397623960baf69ae3cec04a87a23e (patch)
treeccbb2d7962e21609184e4c18886a5326d3843f53 /apt-pkg/pkgcachegen.cc
parent6c413b188618b9fcb5368b60971dfa5d45b3cd74 (diff)
Deprecate SPtrArray<T> and convert everyone to unique_ptr<T[]>
More standardization
Diffstat (limited to 'apt-pkg/pkgcachegen.cc')
-rw-r--r--apt-pkg/pkgcachegen.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc
index a9de20878..68175a24a 100644
--- a/apt-pkg/pkgcachegen.cc
+++ b/apt-pkg/pkgcachegen.cc
@@ -1260,8 +1260,8 @@ static bool CheckValidity(const string &CacheFile,
return false;
}
- SPtrArray<bool> RlsVisited = new bool[Cache.HeaderP->ReleaseFileCount];
- memset(RlsVisited,0,sizeof(*RlsVisited)*Cache.HeaderP->ReleaseFileCount);
+ std::unique_ptr<bool[]> RlsVisited(new bool[Cache.HeaderP->ReleaseFileCount]);
+ memset(RlsVisited.get(),0,sizeof(RlsVisited[0])*Cache.HeaderP->ReleaseFileCount);
std::vector<pkgIndexFile *> Files;
for (pkgSourceList::const_iterator i = List.begin(); i != List.end(); ++i)
{
@@ -1295,8 +1295,8 @@ static bool CheckValidity(const string &CacheFile,
/* Now we check every index file, see if it is in the cache,
verify the IMS data and check that it is on the disk too.. */
- SPtrArray<bool> Visited = new bool[Cache.HeaderP->PackageFileCount];
- memset(Visited,0,sizeof(*Visited)*Cache.HeaderP->PackageFileCount);
+ std::unique_ptr<bool[]> Visited(new bool[Cache.HeaderP->PackageFileCount]);
+ memset(Visited.get(),0,sizeof(Visited[0])*Cache.HeaderP->PackageFileCount);
for (std::vector<pkgIndexFile *>::const_reverse_iterator PkgFile = Files.rbegin(); PkgFile != Files.rend(); ++PkgFile)
{
if (Debug == true)