From ea54214002c09eeb4dd498d97a564471ec9993c5 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 13 Sep 2011 10:09:00 +0200 Subject: reorder includes: add if needed and include it at first --- apt-pkg/edsp/edspindexfile.cc | 2 ++ apt-pkg/edsp/edsplistparser.cc | 2 ++ apt-pkg/edsp/edspsystem.cc | 5 ++++- 3 files changed, 8 insertions(+), 1 deletion(-) (limited to 'apt-pkg/edsp') diff --git a/apt-pkg/edsp/edspindexfile.cc b/apt-pkg/edsp/edspindexfile.cc index f5881e663..b417a7562 100644 --- a/apt-pkg/edsp/edspindexfile.cc +++ b/apt-pkg/edsp/edspindexfile.cc @@ -6,6 +6,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include + #include #include #include diff --git a/apt-pkg/edsp/edsplistparser.cc b/apt-pkg/edsp/edsplistparser.cc index 3349e8cce..e00abdbcc 100644 --- a/apt-pkg/edsp/edsplistparser.cc +++ b/apt-pkg/edsp/edsplistparser.cc @@ -9,6 +9,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include + #include #include #include diff --git a/apt-pkg/edsp/edspsystem.cc b/apt-pkg/edsp/edspsystem.cc index ac0bb8beb..10d75771a 100644 --- a/apt-pkg/edsp/edspsystem.cc +++ b/apt-pkg/edsp/edspsystem.cc @@ -9,17 +9,20 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include + #include #include #include #include #include #include -#include #include #include #include #include + +#include /*}}}*/ edspSystem edspSys; -- cgit v1.2.3 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-pkg/edsp/edspindexfile.h | 2 +- apt-pkg/edsp/edsplistparser.cc | 8 ++++---- apt-pkg/edsp/edsplistparser.h | 8 ++++---- apt-pkg/edsp/edspsystem.cc | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'apt-pkg/edsp') diff --git a/apt-pkg/edsp/edspindexfile.h b/apt-pkg/edsp/edspindexfile.h index 0053388eb..58a7f62a9 100644 --- a/apt-pkg/edsp/edspindexfile.h +++ b/apt-pkg/edsp/edspindexfile.h @@ -22,7 +22,7 @@ class edspIndex : public debStatusIndex virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const; - edspIndex(string File); + edspIndex(std::string File); }; #endif diff --git a/apt-pkg/edsp/edsplistparser.cc b/apt-pkg/edsp/edsplistparser.cc index e00abdbcc..bcfdb1017 100644 --- a/apt-pkg/edsp/edsplistparser.cc +++ b/apt-pkg/edsp/edsplistparser.cc @@ -20,7 +20,7 @@ /*}}}*/ // ListParser::edspListParser - Constructor /*{{{*/ -edspListParser::edspListParser(FileFd *File, string const &Arch) : debListParser(File, Arch) +edspListParser::edspListParser(FileFd *File, std::string const &Arch) : debListParser(File, Arch) {} /*}}}*/ // ListParser::NewVersion - Fill in the version structure /*{{{*/ @@ -33,11 +33,11 @@ bool edspListParser::NewVersion(pkgCache::VerIterator &Ver) // ListParser::Description - Return the description string /*{{{*/ // --------------------------------------------------------------------- /* Sorry, no description for the resolvers… */ -string edspListParser::Description() +std::string edspListParser::Description() { return ""; } -string edspListParser::DescriptionLanguage() +std::string edspListParser::DescriptionLanguage() { return ""; } @@ -85,7 +85,7 @@ bool edspListParser::ParseStatus(pkgCache::PkgIterator &Pkg, /*}}}*/ // ListParser::LoadReleaseInfo - Load the release information /*{{{*/ bool edspListParser::LoadReleaseInfo(pkgCache::PkgFileIterator &FileI, - FileFd &File, string component) + FileFd &File, std::string component) { return true; } diff --git a/apt-pkg/edsp/edsplistparser.h b/apt-pkg/edsp/edsplistparser.h index ec9f09905..3e196cb9a 100644 --- a/apt-pkg/edsp/edsplistparser.h +++ b/apt-pkg/edsp/edsplistparser.h @@ -20,15 +20,15 @@ class edspListParser : public debListParser { public: virtual bool NewVersion(pkgCache::VerIterator &Ver); - virtual string Description(); - virtual string DescriptionLanguage(); + virtual std::string Description(); + virtual std::string DescriptionLanguage(); virtual MD5SumValue Description_md5(); virtual unsigned short VersionHash(); bool LoadReleaseInfo(pkgCache::PkgFileIterator &FileI,FileFd &File, - string section); + std::string section); - edspListParser(FileFd *File, string const &Arch = ""); + edspListParser(FileFd *File, std::string const &Arch = ""); protected: virtual bool ParseStatus(pkgCache::PkgIterator &Pkg,pkgCache::VerIterator &Ver); diff --git a/apt-pkg/edsp/edspsystem.cc b/apt-pkg/edsp/edspsystem.cc index 10d75771a..6b9207451 100644 --- a/apt-pkg/edsp/edspsystem.cc +++ b/apt-pkg/edsp/edspsystem.cc @@ -97,7 +97,7 @@ signed edspSystem::Score(Configuration const &Cnf) } /*}}}*/ // System::AddStatusFiles - Register the status files /*{{{*/ -bool edspSystem::AddStatusFiles(vector &List) +bool edspSystem::AddStatusFiles(std::vector &List) { if (StatusFile == 0) { -- cgit v1.2.3 From 472ff00ef2e48383805d281c6364ec27839e3f4d Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 19 Sep 2011 19:14:19 +0200 Subject: use forward declaration in headers if possible instead of includes --- apt-pkg/edsp/edspindexfile.cc | 1 + apt-pkg/edsp/edspindexfile.h | 1 - apt-pkg/edsp/edsplistparser.h | 5 ++--- 3 files changed, 3 insertions(+), 4 deletions(-) (limited to 'apt-pkg/edsp') diff --git a/apt-pkg/edsp/edspindexfile.cc b/apt-pkg/edsp/edspindexfile.cc index b417a7562..058cef636 100644 --- a/apt-pkg/edsp/edspindexfile.cc +++ b/apt-pkg/edsp/edspindexfile.cc @@ -15,6 +15,7 @@ #include #include #include +#include #include #include diff --git a/apt-pkg/edsp/edspindexfile.h b/apt-pkg/edsp/edspindexfile.h index 58a7f62a9..9670c4837 100644 --- a/apt-pkg/edsp/edspindexfile.h +++ b/apt-pkg/edsp/edspindexfile.h @@ -8,7 +8,6 @@ #ifndef PKGLIB_EDSPINDEXFILE_H #define PKGLIB_EDSPINDEXFILE_H -#include #include class edspIndex : public debStatusIndex diff --git a/apt-pkg/edsp/edsplistparser.h b/apt-pkg/edsp/edsplistparser.h index 3e196cb9a..5d82716c7 100644 --- a/apt-pkg/edsp/edsplistparser.h +++ b/apt-pkg/edsp/edsplistparser.h @@ -12,9 +12,8 @@ #define PKGLIB_EDSPLISTPARSER_H #include -#include -#include -#include + +class FileFd; class edspListParser : public debListParser { -- cgit v1.2.3