From 8f3ba4e8708cb72be19dacc2af4f601ee5fea292 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 19 Sep 2011 13:31:29 +0200 Subject: do not pollute namespace in the headers with using (Closes: #500198) --- apt-inst/contrib/arfile.cc | 2 +- apt-inst/contrib/arfile.h | 2 +- apt-inst/contrib/extracttar.h | 6 ++---- apt-inst/database.cc | 2 +- apt-inst/database.h | 6 +++--- apt-inst/deb/debfile.cc | 6 +++--- apt-inst/deb/debfile.h | 4 ++-- apt-inst/deb/dpkgdb.h | 8 ++++---- apt-inst/extract.h | 2 +- apt-inst/filelist.h | 2 +- 10 files changed, 19 insertions(+), 21 deletions(-) (limited to 'apt-inst') diff --git a/apt-inst/contrib/arfile.cc b/apt-inst/contrib/arfile.cc index 533c563f9..4e078349e 100644 --- a/apt-inst/contrib/arfile.cc +++ b/apt-inst/contrib/arfile.cc @@ -115,7 +115,7 @@ bool ARArchive::LoadHeaders() { unsigned int I = sizeof(Head.Name) - 1; for (; Head.Name[I] == ' ' || Head.Name[I] == '/'; I--); - Memb->Name = string(Head.Name,I+1); + Memb->Name = std::string(Head.Name,I+1); } // Account for the AR header alignment diff --git a/apt-inst/contrib/arfile.h b/apt-inst/contrib/arfile.h index e2063cd71..bfc128ace 100644 --- a/apt-inst/contrib/arfile.h +++ b/apt-inst/contrib/arfile.h @@ -49,7 +49,7 @@ class ARArchive struct ARArchive::Member { // Fields from the header - string Name; + std::string Name; unsigned long MTime; unsigned long UID; unsigned long GID; diff --git a/apt-inst/contrib/extracttar.h b/apt-inst/contrib/extracttar.h index 42f8ef534..27c453d0d 100644 --- a/apt-inst/contrib/extracttar.h +++ b/apt-inst/contrib/extracttar.h @@ -19,8 +19,6 @@ #include -using std::min; - class ExtractTar { protected: @@ -38,7 +36,7 @@ class ExtractTar int GZPid; FileFd InFd; bool Eof; - string DecompressProg; + std::string DecompressProg; // Fork and reap gzip bool StartGzip(); @@ -48,7 +46,7 @@ class ExtractTar bool Go(pkgDirStream &Stream); - ExtractTar(FileFd &Fd,unsigned long Max,string DecompressionProgram); + ExtractTar(FileFd &Fd,unsigned long Max,std::string DecompressionProgram); virtual ~ExtractTar(); }; diff --git a/apt-inst/database.cc b/apt-inst/database.cc index 0647959a9..1a94e1353 100644 --- a/apt-inst/database.cc +++ b/apt-inst/database.cc @@ -17,7 +17,7 @@ // --------------------------------------------------------------------- /* This re-initializes the meta temporary directory if it hasn't yet been inited for this cycle. The flag is the emptyness of MetaDir */ -bool pkgDataBase::GetMetaTmp(string &Dir) +bool pkgDataBase::GetMetaTmp(std::string &Dir) { if (MetaDir.empty() == true) if (InitMetaTmp(MetaDir) == false) diff --git a/apt-inst/database.h b/apt-inst/database.h index ef45bc2d6..cd0e310bc 100644 --- a/apt-inst/database.h +++ b/apt-inst/database.h @@ -30,8 +30,8 @@ class pkgDataBase pkgCacheGenerator *Cache; pkgFLCache *FList; - string MetaDir; - virtual bool InitMetaTmp(string &Dir) = 0; + std::string MetaDir; + virtual bool InitMetaTmp(std::string &Dir) = 0; public: @@ -40,7 +40,7 @@ class pkgDataBase inline pkgFLCache &GetFLCache() {return *FList;}; inline pkgCacheGenerator &GetGenerator() {return *Cache;}; - bool GetMetaTmp(string &Dir); + bool GetMetaTmp(std::string &Dir); virtual bool ReadyFileList(OpProgress &Progress) = 0; virtual bool ReadyPkgCache(OpProgress &Progress) = 0; virtual bool LoadChanges() = 0; diff --git a/apt-inst/deb/debfile.cc b/apt-inst/deb/debfile.cc index e80d8c735..8ade547f5 100644 --- a/apt-inst/deb/debfile.cc +++ b/apt-inst/deb/debfile.cc @@ -107,8 +107,8 @@ bool debDebFile::ExtractControl(pkgDataBase &DB) return false; // Get into the temporary directory - string Cwd = SafeGetCWD(); - string Tmp; + std::string Cwd = SafeGetCWD(); + std::string Tmp; if (DB.GetMetaTmp(Tmp) == false) return false; if (chdir(Tmp.c_str()) != 0) @@ -174,7 +174,7 @@ bool debDebFile::ExtractArchive(pkgDirStream &Stream) pkgCache::VerIterator debDebFile::MergeControl(pkgDataBase &DB) { // Open the control file - string Tmp; + std::string Tmp; if (DB.GetMetaTmp(Tmp) == false) return pkgCache::VerIterator(DB.GetCache()); FileFd Fd(Tmp + "control",FileFd::ReadOnly); diff --git a/apt-inst/deb/debfile.h b/apt-inst/deb/debfile.h index 6b9f8ffc8..e404d81db 100644 --- a/apt-inst/deb/debfile.h +++ b/apt-inst/deb/debfile.h @@ -68,7 +68,7 @@ class debDebFile::MemControlExtract : public pkgDirStream char *Control; pkgTagSection Section; unsigned long Length; - string Member; + std::string Member; // Members from DirStream virtual bool DoItem(Item &Itm,int &Fd); @@ -81,7 +81,7 @@ class debDebFile::MemControlExtract : public pkgDirStream bool TakeControl(const void *Data,unsigned long Size); MemControlExtract() : IsControl(false), Control(0), Length(0), Member("control") {}; - MemControlExtract(string Member) : IsControl(false), Control(0), Length(0), Member(Member) {}; + MemControlExtract(std::string Member) : IsControl(false), Control(0), Length(0), Member(Member) {}; ~MemControlExtract() {delete [] Control;}; }; /*}}}*/ diff --git a/apt-inst/deb/dpkgdb.h b/apt-inst/deb/dpkgdb.h index 125845f96..3656929aa 100644 --- a/apt-inst/deb/dpkgdb.h +++ b/apt-inst/deb/dpkgdb.h @@ -25,14 +25,14 @@ class debDpkgDB : public pkgDataBase { protected: - - string AdminDir; + + std::string AdminDir; DynamicMMap *CacheMap; DynamicMMap *FileMap; unsigned long DiverInode; signed long DiverTime; - - virtual bool InitMetaTmp(string &Dir); + + virtual bool InitMetaTmp(std::string &Dir); bool ReadFList(OpProgress &Progress); bool ReadDiversions(); bool ReadConfFiles(); diff --git a/apt-inst/extract.h b/apt-inst/extract.h index 71222983c..7143fa409 100644 --- a/apt-inst/extract.h +++ b/apt-inst/extract.h @@ -33,7 +33,7 @@ class pkgExtract : public pkgDirStream bool HandleOverwrites(pkgFLCache::NodeIterator Nde, bool DiverCheck = false); - bool CheckDirReplace(string Dir,unsigned int Depth = 0); + bool CheckDirReplace(std::string Dir,unsigned int Depth = 0); public: diff --git a/apt-inst/filelist.h b/apt-inst/filelist.h index c74a310e4..69c483e71 100644 --- a/apt-inst/filelist.h +++ b/apt-inst/filelist.h @@ -48,7 +48,7 @@ class pkgFLCache class DiverIterator; protected: - string CacheFile; + std::string CacheFile; DynamicMMap ⤅ map_ptrloc LastTreeLookup; unsigned long LastLookupSize; -- cgit v1.2.3