diff options
author | Julian Andres Klode <jak@debian.org> | 2015-08-13 10:49:31 +0200 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2015-08-13 11:30:59 +0200 |
commit | 6c413b188618b9fcb5368b60971dfa5d45b3cd74 (patch) | |
tree | b50631d5318f7846368b9cc32f02568bdf86d895 /cmdline | |
parent | 47c37a1bfc2f2f372bf057bf68bde0b3b6f0ec8f (diff) |
Mark SPtr as deprecated, and convert users to std::unique_ptr
Switch to std::unique_ptr, as this is safer than SPtr.
Diffstat (limited to 'cmdline')
-rw-r--r-- | cmdline/apt-get.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index b0e646833..0b79c507a 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1000,7 +1000,7 @@ static bool DoBuildDep(CommandLine &CmdL) { string Src; pkgSrcRecords::Parser *Last = 0; - SPtr<pkgSrcRecords::Parser> LastOwner; + std::unique_ptr<pkgSrcRecords::Parser> LastOwner; // an unpacked debian source tree using APT::String::Startswith; @@ -1012,7 +1012,7 @@ static bool DoBuildDep(CommandLine &CmdL) std::string TypeName = "Debian control file"; pkgIndexFile::Type *Type = pkgIndexFile::Type::GetType(TypeName.c_str()); if(Type != NULL) - LastOwner = Last = Type->CreateSrcPkgParser(*I); + LastOwner.reset(Last = Type->CreateSrcPkgParser(*I)); } // if its a local file (e.g. .dsc) use this else if (FileExists(*I)) @@ -1023,7 +1023,7 @@ static bool DoBuildDep(CommandLine &CmdL) string TypeName = "Debian " + flExtension(*I) + " file"; pkgIndexFile::Type *Type = pkgIndexFile::Type::GetType(TypeName.c_str()); if(Type != NULL) - LastOwner = Last = Type->CreateSrcPkgParser(*I); + LastOwner.reset(Last = Type->CreateSrcPkgParser(*I)); } else { // normal case, search the cache for the source file Last = FindSrc(*I,SrcRecs,Src,Cache); |