]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/vendorlist.cc
cppcheck complains about some possible speed improvements which could be
[apt.git] / apt-pkg / vendorlist.cc
index 92ff3889448340688d14bc55f96f11194009eeaf..4cc500727bd8cf58010d59777e9184a3459c9935 100644 (file)
@@ -1,12 +1,17 @@
-#include <apt-pkg/vendorlist.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/error.h>
 #include <apti18n.h>
 
+#if __GNUC__ >= 4
+       #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
+#include <apt-pkg/vendorlist.h>
+
 pkgVendorList::~pkgVendorList()
 {
    for (vector<const Vendor *>::const_iterator I = VendorList.begin(); 
-        I != VendorList.end(); I++)
+        I != VendorList.end(); ++I)
       delete *I;
 }
 
@@ -44,7 +49,7 @@ bool pkgVendorList::Read(string File)                                 /*{{{*/
 bool pkgVendorList::CreateList(Configuration& Cnf)                     /*{{{*/
 {
    for (vector<const Vendor *>::const_iterator I = VendorList.begin(); 
-       I != VendorList.end(); I++)
+       I != VendorList.end(); ++I)
       delete *I;
    VendorList.erase(VendorList.begin(),VendorList.end());
 
@@ -124,7 +129,7 @@ const Vendor* pkgVendorList::LookupFingerprint(string Fingerprint)  /*{{{*/
                                                                        /*}}}*/
 const Vendor* pkgVendorList::FindVendor(const std::vector<string> GPGVOutput)  /*{{{*/
 {
-   for (std::vector<string>::const_iterator I = GPGVOutput.begin(); I != GPGVOutput.end(); I++)
+   for (std::vector<string>::const_iterator I = GPGVOutput.begin(); I != GPGVOutput.end(); ++I)
    {
       string::size_type pos = (*I).find("VALIDSIG ");
       if (_config->FindB("Debug::Vendor", false))
@@ -143,3 +148,7 @@ const Vendor* pkgVendorList::FindVendor(const std::vector<string> GPGVOutput)       /*
    return NULL;
 }
                                                                        /*}}}*/
+
+#if __GNUC__ >= 4
+       #pragma GCC diagnostic warning "-Wdeprecated-declarations"
+#endif