diff options
author | Julian Andres Klode <julian.klode@canonical.com> | 2019-06-12 13:47:46 +0200 |
---|---|---|
committer | Julian Andres Klode <julian.klode@canonical.com> | 2019-06-12 15:02:55 +0200 |
commit | 82b881caafa0c82b20db3900f8b76cebd8a393a4 (patch) | |
tree | f87173bc7986992043a8e07ae05cae9bed8083fd /apt-pkg | |
parent | daa1352ed3d2bb4bc6aa0f0e7f22be3f0908942d (diff) | |
download | apt-82b881caafa0c82b20db3900f8b76cebd8a393a4.tar.gz |
Adjust code for missing includes/using std::string
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/metaindex.cc | 10 | ||||
-rw-r--r-- | apt-pkg/statechanges.cc | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/apt-pkg/metaindex.cc b/apt-pkg/metaindex.cc index 8cbdb5e01..d0b3f5165 100644 --- a/apt-pkg/metaindex.cc +++ b/apt-pkg/metaindex.cc @@ -83,7 +83,7 @@ APT_PURE time_t metaIndex::GetDate() const { return this->Date; } APT_PURE metaIndex::TriState metaIndex::GetLoadedSuccessfully() const { return LoadedSuccessfully; } APT_PURE std::string metaIndex::GetExpectedDist() const { return Dist; } /*}}}*/ -bool metaIndex::CheckDist(string const &MaybeDist) const /*{{{*/ +bool metaIndex::CheckDist(std::string const &MaybeDist) const /*{{{*/ { if (MaybeDist.empty() || this->Codename == MaybeDist || this->Suite == MaybeDist) return true; @@ -93,7 +93,7 @@ bool metaIndex::CheckDist(string const &MaybeDist) const /*{{{*/ Transformed = "experimental"; auto const pos = Transformed.rfind('/'); - if (pos != string::npos) + if (pos != std::string::npos) Transformed = Transformed.substr(0, pos); if (Transformed == ".") @@ -102,7 +102,7 @@ bool metaIndex::CheckDist(string const &MaybeDist) const /*{{{*/ return Transformed.empty() || this->Codename == Transformed || this->Suite == Transformed; } /*}}}*/ -APT_PURE metaIndex::checkSum *metaIndex::Lookup(string const &MetaKey) const /*{{{*/ +APT_PURE metaIndex::checkSum *metaIndex::Lookup(std::string const &MetaKey) const /*{{{*/ { std::map<std::string, metaIndex::checkSum* >::const_iterator sum = Entries.find(MetaKey); if (sum == Entries.end()) @@ -110,7 +110,7 @@ APT_PURE metaIndex::checkSum *metaIndex::Lookup(string const &MetaKey) const /*{ return sum->second; } /*}}}*/ -APT_PURE bool metaIndex::Exists(string const &MetaKey) const /*{{{*/ +APT_PURE bool metaIndex::Exists(std::string const &MetaKey) const /*{{{*/ { return Entries.find(MetaKey) != Entries.end(); } @@ -118,7 +118,7 @@ APT_PURE bool metaIndex::Exists(string const &MetaKey) const /*{{{*/ std::vector<std::string> metaIndex::MetaKeys() const /*{{{*/ { std::vector<std::string> keys; - std::map<string,checkSum *>::const_iterator I = Entries.begin(); + std::map<std::string, checkSum *>::const_iterator I = Entries.begin(); while(I != Entries.end()) { keys.push_back((*I).first); ++I; diff --git a/apt-pkg/statechanges.cc b/apt-pkg/statechanges.cc index 258c84885..45468e462 100644 --- a/apt-pkg/statechanges.cc +++ b/apt-pkg/statechanges.cc @@ -1,9 +1,11 @@ #include <apt-pkg/cacheset.h> +#include <apt-pkg/configuration.h> #include <apt-pkg/debsystem.h> #include <apt-pkg/fileutl.h> #include <apt-pkg/pkgcache.h> #include <apt-pkg/prettyprinters.h> #include <apt-pkg/statechanges.h> +#include <apt-pkg/strutl.h> #include <algorithm> #include <memory> |