summaryrefslogtreecommitdiff
path: root/apt-pkg/edsp
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/edsp')
-rw-r--r--apt-pkg/edsp/edspindexfile.cc15
-rw-r--r--apt-pkg/edsp/edsplistparser.cc7
-rw-r--r--apt-pkg/edsp/edsplistparser.h4
-rw-r--r--apt-pkg/edsp/edspsystem.cc3
-rw-r--r--apt-pkg/edsp/edspsystem.h3
5 files changed, 15 insertions, 17 deletions
diff --git a/apt-pkg/edsp/edspindexfile.cc b/apt-pkg/edsp/edspindexfile.cc
index 042a88cf9..1a8af89f0 100644
--- a/apt-pkg/edsp/edspindexfile.cc
+++ b/apt-pkg/edsp/edspindexfile.cc
@@ -16,9 +16,10 @@
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/pkgrecords.h>
+#include <memory>
+#include <string>
#include <stddef.h>
#include <unistd.h>
-#include <string>
/*}}}*/
// EDSP-like Index /*{{{*/
@@ -61,12 +62,12 @@ std::string edspIndex::GetComponent() const
pkgCacheListParser * edspIndex::CreateListParser(FileFd &Pkg)
{
if (Pkg.IsOpen() == false)
- return NULL;
+ return nullptr;
_error->PushToStack();
- pkgCacheListParser * const Parser = new edspListParser(&Pkg);
+ std::unique_ptr<pkgCacheListParser> Parser(new edspListParser(&Pkg));
bool const newError = _error->PendingError();
_error->MergeWithStack();
- return newError ? NULL : Parser;
+ return newError ? nullptr : Parser.release();
}
/*}}}*/
// EIPP Index /*{{{*/
@@ -80,12 +81,12 @@ std::string eippIndex::GetComponent() const
pkgCacheListParser * eippIndex::CreateListParser(FileFd &Pkg)
{
if (Pkg.IsOpen() == false)
- return NULL;
+ return nullptr;
_error->PushToStack();
- pkgCacheListParser * const Parser = new eippListParser(&Pkg);
+ std::unique_ptr<pkgCacheListParser> Parser(new eippListParser(&Pkg));
bool const newError = _error->PendingError();
_error->MergeWithStack();
- return newError ? NULL : Parser;
+ return newError ? nullptr : Parser.release();
}
/*}}}*/
diff --git a/apt-pkg/edsp/edsplistparser.cc b/apt-pkg/edsp/edsplistparser.cc
index 4119639a6..b118e127d 100644
--- a/apt-pkg/edsp/edsplistparser.cc
+++ b/apt-pkg/edsp/edsplistparser.cc
@@ -12,15 +12,14 @@
#include <config.h>
#include <apt-pkg/configuration.h>
+#include <apt-pkg/deblistparser.h>
#include <apt-pkg/edsplistparser.h>
+#include <apt-pkg/fileutl.h>
#include <apt-pkg/md5.h>
-#include <apt-pkg/deblistparser.h>
#include <apt-pkg/pkgcache.h>
-#include <apt-pkg/cacheiterators.h>
-#include <apt-pkg/tagfile.h>
-#include <apt-pkg/fileutl.h>
#include <apt-pkg/pkgsystem.h>
#include <apt-pkg/string_view.h>
+#include <apt-pkg/tagfile.h>
#include <array>
diff --git a/apt-pkg/edsp/edsplistparser.h b/apt-pkg/edsp/edsplistparser.h
index 4904b6567..0fcc3f5fd 100644
--- a/apt-pkg/edsp/edsplistparser.h
+++ b/apt-pkg/edsp/edsplistparser.h
@@ -12,15 +12,15 @@
#define PKGLIB_EDSPLISTPARSER_H
#include <apt-pkg/deblistparser.h>
+#include <apt-pkg/fileutl.h>
#include <apt-pkg/md5.h>
#include <apt-pkg/pkgcache.h>
-#include <apt-pkg/fileutl.h>
#include <string>
#ifndef APT_8_CLEANER_HEADERS
-#include <apt-pkg/pkgcachegen.h>
#include <apt-pkg/indexfile.h>
+#include <apt-pkg/pkgcachegen.h>
#include <apt-pkg/tagfile.h>
#endif
diff --git a/apt-pkg/edsp/edspsystem.cc b/apt-pkg/edsp/edspsystem.cc
index 1ceb21a17..47f5e06d5 100644
--- a/apt-pkg/edsp/edspsystem.cc
+++ b/apt-pkg/edsp/edspsystem.cc
@@ -15,9 +15,8 @@
#include <apt-pkg/debversion.h>
#include <apt-pkg/edspindexfile.h>
#include <apt-pkg/edspsystem.h>
-#include <apt-pkg/pkgcache.h>
-#include <apt-pkg/cacheiterators.h>
#include <apt-pkg/fileutl.h>
+#include <apt-pkg/pkgcache.h>
#include <stddef.h>
#include <stdlib.h>
diff --git a/apt-pkg/edsp/edspsystem.h b/apt-pkg/edsp/edspsystem.h
index c0c9526b5..af8bcf128 100644
--- a/apt-pkg/edsp/edspsystem.h
+++ b/apt-pkg/edsp/edspsystem.h
@@ -10,9 +10,8 @@
#ifndef PKGLIB_EDSPSYSTEM_H
#define PKGLIB_EDSPSYSTEM_H
-#include <apt-pkg/pkgsystem.h>
-#include <apt-pkg/cacheiterators.h>
#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/pkgsystem.h>
#include <memory>
#include <vector>