From 73688d27f60b2da3889a06362ee567101e3b331e Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 15 Dec 2011 09:13:21 +0100 Subject: =?UTF-8?q?atleast=20libapt=20should=20announce=20to=20itself=20th?= =?UTF-8?q?at=20it=20is=20clean=E2=80=A6=20(and=20be=20it=20if=20it=20trie?= =?UTF-8?q?s=20to=20announce=20that=E2=80=A6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apt-pkg/deb/debindexfile.cc | 2 ++ apt-pkg/edsp/edspindexfile.cc | 4 ++-- apt-pkg/pkgcachegen.cc | 16 +++++++++------- apt-pkg/sourcelist.h | 4 ++-- apt-pkg/srcrecords.cc | 8 ++++---- 5 files changed, 19 insertions(+), 15 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc index 2635d52c8..84791a70a 100644 --- a/apt-pkg/deb/debindexfile.cc +++ b/apt-pkg/deb/debindexfile.cc @@ -26,6 +26,8 @@ #include /*}}}*/ +using std::string; + // SourcesIndex::debSourcesIndex - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ diff --git a/apt-pkg/edsp/edspindexfile.cc b/apt-pkg/edsp/edspindexfile.cc index 5d824f9cb..482581979 100644 --- a/apt-pkg/edsp/edspindexfile.cc +++ b/apt-pkg/edsp/edspindexfile.cc @@ -24,7 +24,7 @@ // 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) 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()); // Store the IMS information diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index 9f999c41b..ec072fddd 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -35,12 +35,14 @@ #include /*}}}*/ -typedef vector::iterator FileIterator; +typedef std::vector::iterator FileIterator; template std::vector pkgCacheGenerator::Dynamic::toReMap; bool IsDuplicateDescription(pkgCache::DescIterator Desc, MD5SumValue const &CurMd5, std::string const &CurLang); +using std::string; + // CacheGenerator::pkgCacheGenerator - Constructor /*{{{*/ // --------------------------------------------------------------------- /* 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) { bool const Debug = _config->FindB("Debug::pkgCacheGen", false); - - vector Files; - for (vector::const_iterator i = List.begin(); + + std::vector Files; + for (std::vector::const_iterator i = List.begin(); i != List.end(); ++i) { - vector *Indexes = (*i)->GetIndexFiles(); - for (vector::const_iterator j = Indexes->begin(); + std::vector *Indexes = (*i)->GetIndexFiles(); + for (std::vector::const_iterator j = Indexes->begin(); j != Indexes->end(); ++j) Files.push_back (*j); @@ -1418,7 +1420,7 @@ __deprecated bool pkgMakeOnlyStatusCache(OpProgress &Progress,DynamicMMap **OutM { return pkgCacheGenerator::MakeOnlyStatusCache(&Progress, OutMap); } bool pkgCacheGenerator::MakeOnlyStatusCache(OpProgress *Progress,DynamicMMap **OutMap) { - vector Files; + std::vector Files; unsigned long EndOfSource = Files.size(); if (_system->AddStatusFiles(Files) == false) return false; diff --git a/apt-pkg/sourcelist.h b/apt-pkg/sourcelist.h index 03e29ec34..02e27101a 100644 --- a/apt-pkg/sourcelist.h +++ b/apt-pkg/sourcelist.h @@ -59,11 +59,11 @@ class pkgSourceList const char *Name; const char *Label; - bool FixupURI(string &URI) const; + bool FixupURI(std::string &URI) const; virtual bool ParseLine(std::vector &List, const char *Buffer, unsigned long const &CurLine,std::string const &File) const; - virtual bool CreateItem(vector &List,std::string const &URI, + virtual bool CreateItem(std::vector &List,std::string const &URI, std::string const &Dist,std::string const &Section, std::map const &Options) const = 0; Type(); diff --git a/apt-pkg/srcrecords.cc b/apt-pkg/srcrecords.cc index f6d2d5158..48b643eac 100644 --- a/apt-pkg/srcrecords.cc +++ b/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) { - vector *Indexes = (*I)->GetIndexFiles(); - for (vector::const_iterator J = Indexes->begin(); + std::vector *Indexes = (*I)->GetIndexFiles(); + for (std::vector::const_iterator J = Indexes->begin(); J != Indexes->end(); ++J) { Parser* P = (*J)->CreateSrcParser(); @@ -58,7 +58,7 @@ pkgSrcRecords::pkgSrcRecords(pkgSourceList &List) : Files(0), Current(0) pkgSrcRecords::~pkgSrcRecords() { // Blow away all the parser objects - for(vector::iterator I = Files.begin(); I != Files.end(); ++I) + for(std::vector::iterator I = Files.begin(); I != Files.end(); ++I) delete *I; } /*}}}*/ @@ -68,7 +68,7 @@ pkgSrcRecords::~pkgSrcRecords() bool pkgSrcRecords::Restart() { Current = Files.begin(); - for (vector::iterator I = Files.begin(); + for (std::vector::iterator I = Files.begin(); I != Files.end(); ++I) (*I)->Restart(); -- cgit v1.2.3