From 82b881caafa0c82b20db3900f8b76cebd8a393a4 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 12 Jun 2019 13:47:46 +0200 Subject: Adjust code for missing includes/using std::string --- apt-pkg/metaindex.cc | 10 +++++----- apt-pkg/statechanges.cc | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'apt-pkg') 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::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 metaIndex::MetaKeys() const /*{{{*/ { std::vector keys; - std::map::const_iterator I = Entries.begin(); + std::map::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 +#include #include #include #include #include #include +#include #include #include -- cgit v1.2.3