X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/23397c9d7d4d455461176600bb45c81185493504..7824564bfde681eddf6969174bba7604d6f34848:/apt-pkg/indexrecords.cc diff --git a/apt-pkg/indexrecords.cc b/apt-pkg/indexrecords.cc index e1e9ba657..d65266f64 100644 --- a/apt-pkg/indexrecords.cc +++ b/apt-pkg/indexrecords.cc @@ -119,14 +119,7 @@ bool indexRecords::Load(const string Filename) /*{{{*/ std::string SizeStr; strprintf(SizeStr, "%llu", Size); Sum->Hashes.push_back(HashString("Checksum-FileSize", SizeStr)); -#if __GNUC__ >= 4 - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#endif - Sum->Hash = HashString(HashString::SupportedHashes()[i],Hash); -#if __GNUC__ >= 4 - #pragma GCC diagnostic pop -#endif + APT_IGNORE_DEPRECATED(Sum->Hash = HashString(HashString::SupportedHashes()[i],Hash);) Entries[Name] = Sum; } Entries[Name]->Hashes.push_back(HashString(HashString::SupportedHashes()[i],Hash)); @@ -277,10 +270,23 @@ void indexRecords::SetTrusted(bool const Trusted) this->Trusted = NEVER_TRUSTED; } +#if APT_PKG_ABI >= 413 indexRecords::indexRecords(const string &ExpectedDist) : Trusted(CHECK_TRUST), d(NULL), ExpectedDist(ExpectedDist), ValidUntil(0), SupportsAcquireByHash(false) { } +#else +indexRecords::indexRecords() : + Trusted(CHECK_TRUST), d(NULL), ExpectedDist(""), ValidUntil(0), + SupportsAcquireByHash(false) +{ +} +indexRecords::indexRecords(const string ExpectedDist) : + Trusted(CHECK_TRUST), d(NULL), ExpectedDist(ExpectedDist), ValidUntil(0), + SupportsAcquireByHash(false) +{ +} +#endif indexRecords::~indexRecords() {}