summaryrefslogtreecommitdiff
path: root/apt-pkg/algorithms.h
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2025-01-13 20:18:35 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2025-02-14 19:45:12 +0100
commit47084b6e10abcb93d0c0190b0368c46320f3a5e5 (patch)
tree73dfe8e05499dbe0516eb63aacababdbd4343e33 /apt-pkg/algorithms.h
parent4027f6ac56fbb788f31d03e30e75cf885a381524 (diff)
algorithms: Use smart pointers
Diffstat (limited to 'apt-pkg/algorithms.h')
-rw-r--r--apt-pkg/algorithms.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/apt-pkg/algorithms.h b/apt-pkg/algorithms.h
index 038015049..bad20aadf 100644
--- a/apt-pkg/algorithms.h
+++ b/apt-pkg/algorithms.h
@@ -46,7 +46,7 @@
class pkgSimulatePrivate;
class APT_PUBLIC pkgSimulate : public pkgPackageManager /*{{{*/
{
- pkgSimulatePrivate * const d;
+ std::unique_ptr<pkgSimulatePrivate> const d;
protected:
class APT_PUBLIC Policy : public pkgDepCache::Policy
@@ -62,7 +62,7 @@ class APT_PUBLIC pkgSimulate : public pkgPackageManager /*{{{*/
explicit Policy(pkgDepCache *Cache) : Cache(Cache) {};
};
- unsigned char *Flags;
+ std::unique_ptr<unsigned char[]> Flags;
Policy iPolicy;
pkgDepCache Sim;
@@ -112,8 +112,8 @@ class APT_PUBLIC pkgProblemResolver /*{{{*/
ToRemove = (1 << 4),
BrokenPolicyAllowed = (1 << 5)
};
- int *Scores;
- unsigned char *Flags;
+ std::unique_ptr<int[]> Scores;
+ std::unique_ptr<unsigned char[]> Flags;
bool Debug;
// Sort stuff