Sfoglia il codice sorgente

atleast libapt should announce to itself that it is clean…
(and be it if it tries to announce that…)

David Kalnischkies 14 anni fa
parent
commit
73688d27f6

+ 2 - 0
apt-pkg/deb/debindexfile.cc

@@ -26,6 +26,8 @@
 #include <sys/stat.h>
 #include <sys/stat.h>
 									/*}}}*/
 									/*}}}*/
 
 
+using std::string;
+
 // SourcesIndex::debSourcesIndex - Constructor				/*{{{*/
 // SourcesIndex::debSourcesIndex - Constructor				/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* */
 /* */

+ 2 - 2
apt-pkg/edsp/edspindexfile.cc

@@ -24,7 +24,7 @@
 // edspIndex::edspIndex - Constructor					/*{{{*/
 // edspIndex::edspIndex - Constructor					/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* */
 /* */
-edspIndex::edspIndex(string File) : debStatusIndex(File)
+edspIndex::edspIndex(std::string File) : debStatusIndex(File)
 {
 {
 }
 }
 									/*}}}*/
 									/*}}}*/
@@ -44,7 +44,7 @@ bool edspIndex::Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const
 
 
    if (Prog != NULL)
    if (Prog != NULL)
       Prog->SubProgress(0,File);
       Prog->SubProgress(0,File);
-   if (Gen.SelectFile(File,string(),*this) == false)
+   if (Gen.SelectFile(File,std::string(),*this) == false)
       return _error->Error("Problem with SelectFile %s",File.c_str());
       return _error->Error("Problem with SelectFile %s",File.c_str());
 
 
    // Store the IMS information
    // Store the IMS information

+ 9 - 7
apt-pkg/pkgcachegen.cc

@@ -35,12 +35,14 @@
 
 
 #include <apti18n.h>
 #include <apti18n.h>
 									/*}}}*/
 									/*}}}*/
-typedef vector<pkgIndexFile *>::iterator FileIterator;
+typedef std::vector<pkgIndexFile *>::iterator FileIterator;
 template <typename Iter> std::vector<Iter*> pkgCacheGenerator::Dynamic<Iter>::toReMap;
 template <typename Iter> std::vector<Iter*> pkgCacheGenerator::Dynamic<Iter>::toReMap;
 
 
 bool IsDuplicateDescription(pkgCache::DescIterator Desc,
 bool IsDuplicateDescription(pkgCache::DescIterator Desc,
 			    MD5SumValue const &CurMd5, std::string const &CurLang);
 			    MD5SumValue const &CurMd5, std::string const &CurLang);
 
 
+using std::string;
+
 // CacheGenerator::pkgCacheGenerator - Constructor			/*{{{*/
 // CacheGenerator::pkgCacheGenerator - Constructor			/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* We set the dirty flag and make sure that is written to the disk */
 /* We set the dirty flag and make sure that is written to the disk */
@@ -1221,14 +1223,14 @@ bool pkgCacheGenerator::MakeStatusCache(pkgSourceList &List,OpProgress *Progress
 			MMap **OutMap,bool AllowMem)
 			MMap **OutMap,bool AllowMem)
 {
 {
    bool const Debug = _config->FindB("Debug::pkgCacheGen", false);
    bool const Debug = _config->FindB("Debug::pkgCacheGen", false);
-   
-   vector<pkgIndexFile *> Files;
-   for (vector<metaIndex *>::const_iterator i = List.begin();
+
+   std::vector<pkgIndexFile *> Files;
+   for (std::vector<metaIndex *>::const_iterator i = List.begin();
         i != List.end();
         i != List.end();
         ++i)
         ++i)
    {
    {
-      vector <pkgIndexFile *> *Indexes = (*i)->GetIndexFiles();
-      for (vector<pkgIndexFile *>::const_iterator j = Indexes->begin();
+      std::vector <pkgIndexFile *> *Indexes = (*i)->GetIndexFiles();
+      for (std::vector<pkgIndexFile *>::const_iterator j = Indexes->begin();
 	   j != Indexes->end();
 	   j != Indexes->end();
 	   ++j)
 	   ++j)
          Files.push_back (*j);
          Files.push_back (*j);
@@ -1418,7 +1420,7 @@ __deprecated bool pkgMakeOnlyStatusCache(OpProgress &Progress,DynamicMMap **OutM
    { return pkgCacheGenerator::MakeOnlyStatusCache(&Progress, OutMap); }
    { return pkgCacheGenerator::MakeOnlyStatusCache(&Progress, OutMap); }
 bool pkgCacheGenerator::MakeOnlyStatusCache(OpProgress *Progress,DynamicMMap **OutMap)
 bool pkgCacheGenerator::MakeOnlyStatusCache(OpProgress *Progress,DynamicMMap **OutMap)
 {
 {
-   vector<pkgIndexFile *> Files;
+   std::vector<pkgIndexFile *> Files;
    unsigned long EndOfSource = Files.size();
    unsigned long EndOfSource = Files.size();
    if (_system->AddStatusFiles(Files) == false)
    if (_system->AddStatusFiles(Files) == false)
       return false;
       return false;

+ 2 - 2
apt-pkg/sourcelist.h

@@ -59,11 +59,11 @@ class pkgSourceList
       const char *Name;
       const char *Name;
       const char *Label;
       const char *Label;
 
 
-      bool FixupURI(string &URI) const;
+      bool FixupURI(std::string &URI) const;
       virtual bool ParseLine(std::vector<metaIndex *> &List,
       virtual bool ParseLine(std::vector<metaIndex *> &List,
 			     const char *Buffer,
 			     const char *Buffer,
 			     unsigned long const &CurLine,std::string const &File) const;
 			     unsigned long const &CurLine,std::string const &File) const;
-      virtual bool CreateItem(vector<metaIndex *> &List,std::string const &URI,
+      virtual bool CreateItem(std::vector<metaIndex *> &List,std::string const &URI,
 			      std::string const &Dist,std::string const &Section,
 			      std::string const &Dist,std::string const &Section,
 			      std::map<std::string, std::string> const &Options) const = 0;
 			      std::map<std::string, std::string> const &Options) const = 0;
       Type();
       Type();

+ 4 - 4
apt-pkg/srcrecords.cc

@@ -29,8 +29,8 @@ pkgSrcRecords::pkgSrcRecords(pkgSourceList &List) : Files(0), Current(0)
 {
 {
    for (pkgSourceList::const_iterator I = List.begin(); I != List.end(); ++I)
    for (pkgSourceList::const_iterator I = List.begin(); I != List.end(); ++I)
    {
    {
-      vector<pkgIndexFile *> *Indexes = (*I)->GetIndexFiles();
-      for (vector<pkgIndexFile *>::const_iterator J = Indexes->begin();
+      std::vector<pkgIndexFile *> *Indexes = (*I)->GetIndexFiles();
+      for (std::vector<pkgIndexFile *>::const_iterator J = Indexes->begin();
 	   J != Indexes->end(); ++J)
 	   J != Indexes->end(); ++J)
       {
       {
          Parser* P = (*J)->CreateSrcParser();
          Parser* P = (*J)->CreateSrcParser();
@@ -58,7 +58,7 @@ pkgSrcRecords::pkgSrcRecords(pkgSourceList &List) : Files(0), Current(0)
 pkgSrcRecords::~pkgSrcRecords()
 pkgSrcRecords::~pkgSrcRecords()
 {
 {
    // Blow away all the parser objects
    // Blow away all the parser objects
-   for(vector<Parser*>::iterator I = Files.begin(); I != Files.end(); ++I)
+   for(std::vector<Parser*>::iterator I = Files.begin(); I != Files.end(); ++I)
       delete *I;
       delete *I;
 }
 }
 									/*}}}*/
 									/*}}}*/
@@ -68,7 +68,7 @@ pkgSrcRecords::~pkgSrcRecords()
 bool pkgSrcRecords::Restart()
 bool pkgSrcRecords::Restart()
 {
 {
    Current = Files.begin();
    Current = Files.begin();
-   for (vector<Parser*>::iterator I = Files.begin();
+   for (std::vector<Parser*>::iterator I = Files.begin();
         I != Files.end(); ++I)
         I != Files.end(); ++I)
       (*I)->Restart();
       (*I)->Restart();
    
    

+ 2 - 0
buildlib/config.h.in

@@ -44,3 +44,5 @@
 
 
 /* The package name string */
 /* The package name string */
 #undef PACKAGE
 #undef PACKAGE
+
+#define APT_8_CLEANER_HEADERS

+ 6 - 4
cmdline/apt-extracttemplates.h

@@ -14,6 +14,8 @@
 #include <apt-pkg/pkgcache.h>
 #include <apt-pkg/pkgcache.h>
 #include <apt-pkg/dirstream.h>
 #include <apt-pkg/dirstream.h>
 
 
+#include <string>
+
 class DebFile : public pkgDirStream
 class DebFile : public pkgDirStream
 {
 {
 	FileFd File;
 	FileFd File;
@@ -31,11 +33,11 @@ public:
 	bool Go();
 	bool Go();
 	bool ParseInfo();
 	bool ParseInfo();
 
 
-	static string GetInstalledVer(const string &package);
+	static std::string GetInstalledVer(const std::string &package);
 
 
-	string Package;
-	string Version;
-	string DepVer, PreDepVer;
+	std::string Package;
+	std::string Version;
+	std::string DepVer, PreDepVer;
 	unsigned int DepOp, PreDepOp;
 	unsigned int DepOp, PreDepOp;
 
 
 	char *Config;
 	char *Config;