X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/3eb9e257855d83d0486d7a5fa7cc5e2edebb6aaa..15901516326737a67f2a9af26cd7e434162de019:/apt-pkg/vendorlist.cc diff --git a/apt-pkg/vendorlist.cc b/apt-pkg/vendorlist.cc index 92ff38894..fb33ff17d 100644 --- a/apt-pkg/vendorlist.cc +++ b/apt-pkg/vendorlist.cc @@ -1,12 +1,31 @@ -#include +#include + #include #include +#include + +#include +#include +#include +#include + #include +#if __GNUC__ >= 4 + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + +#include +#include + +using std::string; +using std::vector; + pkgVendorList::~pkgVendorList() { for (vector::const_iterator I = VendorList.begin(); - I != VendorList.end(); I++) + I != VendorList.end(); ++I) delete *I; } @@ -44,7 +63,7 @@ bool pkgVendorList::Read(string File) /*{{{*/ bool pkgVendorList::CreateList(Configuration& Cnf) /*{{{*/ { for (vector::const_iterator I = VendorList.begin(); - I != VendorList.end(); I++) + I != VendorList.end(); ++I) delete *I; VendorList.erase(VendorList.begin(),VendorList.end()); @@ -54,7 +73,7 @@ bool pkgVendorList::CreateList(Configuration& Cnf) /*{{{*/ Configuration Block(Top); string VendorID = Top->Tag; vector *Fingerprints = new vector; - struct Vendor::Fingerprint *Fingerprint = new struct Vendor::Fingerprint; + struct Vendor::Fingerprint *Fingerprint = new struct Vendor::Fingerprint(); string Origin = Block.Find("Origin"); Fingerprint->Print = Block.Find("Fingerprint"); @@ -124,7 +143,7 @@ const Vendor* pkgVendorList::LookupFingerprint(string Fingerprint) /*{{{*/ /*}}}*/ const Vendor* pkgVendorList::FindVendor(const std::vector GPGVOutput) /*{{{*/ { - for (std::vector::const_iterator I = GPGVOutput.begin(); I != GPGVOutput.end(); I++) + for (std::vector::const_iterator I = GPGVOutput.begin(); I != GPGVOutput.end(); ++I) { string::size_type pos = (*I).find("VALIDSIG "); if (_config->FindB("Debug::Vendor", false)) @@ -143,3 +162,7 @@ const Vendor* pkgVendorList::FindVendor(const std::vector GPGVOutput) /* return NULL; } /*}}}*/ + +#if __GNUC__ >= 4 + #pragma GCC diagnostic pop +#endif