X-Git-Url: http://git.hcoop.net/ntk/apt.git/blobdiff_plain/47f1d6d23c344b4c592565cc1ea61b5456570a06..bb2e0d5add4a291f09d68ebb5588e45dc128d766:/apt-pkg/vendorlist.cc diff --git a/apt-pkg/vendorlist.cc b/apt-pkg/vendorlist.cc index 58999708..60242562 100644 --- a/apt-pkg/vendorlist.cc +++ b/apt-pkg/vendorlist.cc @@ -1,12 +1,24 @@ -#include +#include + #include #include +#include #include +#if __GNUC__ >= 4 + #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; } @@ -21,11 +33,11 @@ bool pkgVendorList::ReadMainList() Configuration Cnf; string CnfFile = _config->FindDir("Dir::Etc::vendorparts"); - if (FileExists(CnfFile) == true) + if (DirectoryExists(CnfFile) == true) if (ReadConfigDir(Cnf,CnfFile,true) == false) return false; CnfFile = _config->FindFile("Dir::Etc::vendorlist"); - if (FileExists(CnfFile) == true) + if (RealFileExists(CnfFile) == true) if (ReadConfigFile(Cnf,CnfFile,true) == false) return false; @@ -44,7 +56,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 +66,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 +136,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 +155,7 @@ const Vendor* pkgVendorList::FindVendor(const std::vector GPGVOutput) /* return NULL; } /*}}}*/ + +#if __GNUC__ >= 4 + #pragma GCC diagnostic warning "-Wdeprecated-declarations" +#endif