X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/afd7b358f94efddb83a2911ec1a21e7280074b1e..bce4caa3078503bc1bec5221c5251d9e418a0f2a:/apt-pkg/indexrecords.cc?ds=sidebyside 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();