From 453b82a388013e522b3a1b9fcd6ed0810dab1f4f Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 5 Mar 2014 22:11:25 +0100 Subject: cleanup headers and especially #includes everywhere Beside being a bit cleaner it hopefully also resolves oddball problems I have with high levels of parallel jobs. Git-Dch: Ignore Reported-By: iwyu (include-what-you-use) --- apt-pkg/versionmatch.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apt-pkg/versionmatch.h') diff --git a/apt-pkg/versionmatch.h b/apt-pkg/versionmatch.h index 433396fc9..a889878ad 100644 --- a/apt-pkg/versionmatch.h +++ b/apt-pkg/versionmatch.h @@ -35,9 +35,10 @@ #ifndef PKGLIB_VERSIONMATCH_H #define PKGLIB_VERSIONMATCH_H +#include +#include #include -#include #ifndef APT_8_CLEANER_HEADERS using std::string; -- cgit v1.2.3 From a02db58fd50ef7fc2f0284852c6b3f98e458a232 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 6 Mar 2014 00:33:10 +0100 Subject: follow method attribute suggestions by gcc Git-Dch: Ignore Reported-By: gcc -Wsuggest-attribute={pure,const,noreturn} --- apt-pkg/versionmatch.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'apt-pkg/versionmatch.h') diff --git a/apt-pkg/versionmatch.h b/apt-pkg/versionmatch.h index a889878ad..4c8f704c8 100644 --- a/apt-pkg/versionmatch.h +++ b/apt-pkg/versionmatch.h @@ -45,7 +45,7 @@ using std::string; #endif class pkgVersionMatch -{ +{ // Version Matching std::string VerStr; bool VerPrefixMatch; @@ -61,20 +61,20 @@ class pkgVersionMatch std::string RelComponent; std::string RelArchitecture; bool MatchAll; - + // Origin Matching std::string OrSite; - + public: - + enum MatchType {None = 0,Version,Release,Origin} Type; - - bool MatchVer(const char *A,std::string B,bool Prefix); + + bool MatchVer(const char *A,std::string B,bool Prefix) APT_PURE; bool ExpressionMatches(const char *pattern, const char *string); bool ExpressionMatches(const std::string& pattern, const char *string); bool FileMatch(pkgCache::PkgFileIterator File); pkgCache::VerIterator Find(pkgCache::PkgIterator Pkg); - + pkgVersionMatch(std::string Data,MatchType Type); }; -- cgit v1.2.3