X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/a0e07f3ec885c12c733c12805391646c202f3f31..c307a4f0aa29c9c52a0e028524d21b448a53d09b:/apt-pkg/indexrecords.cc diff --git a/apt-pkg/indexrecords.cc b/apt-pkg/indexrecords.cc index 448a76c27..af2639beb 100644 --- a/apt-pkg/indexrecords.cc +++ b/apt-pkg/indexrecords.cc @@ -10,11 +10,17 @@ #include #include #include +#include +#include + #include #include #include /*}}}*/ + +using std::string; + string indexRecords::GetDist() const { return this->Dist; @@ -38,7 +44,10 @@ time_t indexRecords::GetValidUntil() const const indexRecords::checkSum *indexRecords::Lookup(const string MetaKey) { - return Entries[MetaKey]; + std::map::const_iterator sum = Entries.find(MetaKey); + if (sum == Entries.end()) + return NULL; + return sum->second; } bool indexRecords::Exists(string const &MetaKey) const @@ -146,7 +155,7 @@ bool indexRecords::Load(const string Filename) /*{{{*/ return true; } /*}}}*/ -vector indexRecords::MetaKeys() /*{{{*/ +std::vector indexRecords::MetaKeys() /*{{{*/ { std::vector keys; std::map::iterator I = Entries.begin();