From 1b5c4c4c1b31436c6840fbeac2383f1e6a8168d3 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 29 Sep 2014 14:00:33 +0200 Subject: fix Configuration::FindVector API Git-Dch: Ignore --- apt-pkg/contrib/configuration.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'apt-pkg/contrib/configuration.h') diff --git a/apt-pkg/contrib/configuration.h b/apt-pkg/contrib/configuration.h index 6345c8a5d..03b37bf55 100644 --- a/apt-pkg/contrib/configuration.h +++ b/apt-pkg/contrib/configuration.h @@ -82,12 +82,8 @@ class Configuration * * \param Name of the parent node * \param Default list of values separated by commas */ - std::vector FindVector(const char *Name, std::string const &Default) const; - std::vector FindVector(std::string const &Name, std::string const &Default) const { return FindVector(Name.c_str(), Default); }; -#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR < 13) - std::vector FindVector(const char *Name) const; -#endif - std::vector FindVector(std::string const &Name="") const { return FindVector(Name.c_str(), ""); }; + std::vector FindVector(const char *Name, std::string const &Default = "") const; + std::vector FindVector(std::string const &Name, std::string const &Default = "") const { return FindVector(Name.c_str(), Default); }; int FindI(const char *Name,int const &Default = 0) const; int FindI(std::string const &Name,int const &Default = 0) const {return FindI(Name.c_str(),Default);}; bool FindB(const char *Name,bool const &Default = false) const; -- cgit v1.2.3 From 3809194b662f48733916e6248cd0c141f281313d Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 29 Sep 2014 15:41:12 +0200 Subject: mark private methods as hidden We are the only possible users of private methods, so we are also the only users who can potentially export them via using them in inline methods. The point is: We don't need these symbols exported if we don't do this, so marking them as hidden removes some methods from the API without breaking anything as nobody could have used them. Git-Dch: Ignore --- apt-pkg/contrib/configuration.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'apt-pkg/contrib/configuration.h') diff --git a/apt-pkg/contrib/configuration.h b/apt-pkg/contrib/configuration.h index 03b37bf55..2ecea8bee 100644 --- a/apt-pkg/contrib/configuration.h +++ b/apt-pkg/contrib/configuration.h @@ -34,6 +34,8 @@ #include #include +#include + #ifndef APT_8_CLEANER_HEADERS using std::string; #endif @@ -59,7 +61,7 @@ class Configuration Item *Root; bool ToFree; - + Item *Lookup(Item *Head,const char *S,unsigned long const &Len,bool const &Create); Item *Lookup(const char *Name,const bool &Create); inline const Item *Lookup(const char *Name) const @@ -123,7 +125,7 @@ class Configuration class MatchAgainstConfig { std::vector patterns; - void clearPatterns(); + APT_HIDDEN void clearPatterns(); public: MatchAgainstConfig(char const * Config); -- cgit v1.2.3