X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/245dde96193702f7f51389d3583dee547f8ba366..503c7d594125f963b92047ad2d9d0644f39136c7:/apt-pkg/pkgrecords.h diff --git a/apt-pkg/pkgrecords.h b/apt-pkg/pkgrecords.h index 66eb17857..8da3265c6 100644 --- a/apt-pkg/pkgrecords.h +++ b/apt-pkg/pkgrecords.h @@ -31,7 +31,7 @@ class pkgRecords /*{{{*/ private: /** \brief dpointer placeholder (for later in case we need it) */ - void *d; + void * const d; pkgCache &Cache; std::vectorFiles; @@ -42,7 +42,7 @@ class pkgRecords /*{{{*/ Parser &Lookup(pkgCache::DescFileIterator const &Desc); // Construct destruct - pkgRecords(pkgCache &Cache); + explicit pkgRecords(pkgCache &Cache); virtual ~pkgRecords(); }; /*}}}*/ @@ -68,17 +68,10 @@ class pkgRecords::Parser /*{{{*/ * choose the hash to be used. */ virtual HashStringList Hashes() const { return HashStringList(); }; -#if APT_PKG_ABI >= 413 - APT_DEPRECATED std::string MD5Hash() const { return GetHashFromHashes("MD5Sum"); }; - APT_DEPRECATED std::string SHA1Hash() const { return GetHashFromHashes("SHA1"); }; - APT_DEPRECATED std::string SHA256Hash() const { return GetHashFromHashes("SHA256"); }; - APT_DEPRECATED std::string SHA512Hash() const { return GetHashFromHashes("SHA512"); }; -#else - APT_DEPRECATED std::string MD5Hash() { return GetHashFromHashes("MD5Sum"); }; - APT_DEPRECATED std::string SHA1Hash() { return GetHashFromHashes("SHA1"); }; - APT_DEPRECATED std::string SHA256Hash() { return GetHashFromHashes("SHA256"); }; - APT_DEPRECATED std::string SHA512Hash() { return GetHashFromHashes("SHA512"); }; -#endif + APT_DEPRECATED_MSG("Use .Hashes instead of a hardcoded hash algorithm") std::string MD5Hash() const { return GetHashFromHashes("MD5Sum"); }; + APT_DEPRECATED_MSG("Use .Hashes instead of a hardcoded hash algorithm") std::string SHA1Hash() const { return GetHashFromHashes("SHA1"); }; + APT_DEPRECATED_MSG("Use .Hashes instead of a hardcoded hash algorithm") std::string SHA256Hash() const { return GetHashFromHashes("SHA256"); }; + APT_DEPRECATED_MSG("Use .Hashes instead of a hardcoded hash algorithm") std::string SHA512Hash() const { return GetHashFromHashes("SHA512"); }; // These are some general stats about the package virtual std::string Maintainer() {return std::string();}; @@ -111,7 +104,7 @@ class pkgRecords::Parser /*{{{*/ virtual ~Parser(); private: - void *d; + void * const d; APT_HIDDEN std::string GetHashFromHashes(char const * const type) const { HashStringList const hashes = Hashes();