From 98cc7fd2c1d397623960baf69ae3cec04a87a23e Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 13 Aug 2015 11:28:32 +0200 Subject: Deprecate SPtrArray and convert everyone to unique_ptr More standardization --- apt-pkg/policy.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-pkg/policy.cc') diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc index 76c36b71b..4711372bc 100644 --- a/apt-pkg/policy.cc +++ b/apt-pkg/policy.cc @@ -100,8 +100,8 @@ bool pkgPolicy::InitDefaults() } // Apply the defaults.. - SPtrArray Fixed = new bool[Cache->HeaderP->PackageFileCount]; - memset(Fixed,0,sizeof(*Fixed)*Cache->HeaderP->PackageFileCount); + std::unique_ptr Fixed(new bool[Cache->HeaderP->PackageFileCount]); + memset(Fixed.get(),0,sizeof(Fixed[0])*Cache->HeaderP->PackageFileCount); StatusOverride = false; for (vector::const_iterator I = Defaults.begin(); I != Defaults.end(); ++I) { -- cgit v1.2.3