From 586d8704716a10e0f8b9c400cab500f5353eebe6 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 26 Oct 2014 23:17:03 +0100 Subject: replace ignore-deprecated #pragma dance with _Pragma For compatibility we use/provide and fill quiet some deprecated methods and fields, which subsequently earns us a warning for using them. These warnings therefore have to be disabled for these codeparts and that is what this change does now in a slightly more elegant way. Git-Dch: Ignore --- apt-pkg/indexrecords.cc | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'apt-pkg/indexrecords.cc') diff --git a/apt-pkg/indexrecords.cc b/apt-pkg/indexrecords.cc index e1e9ba657..0f27af32b 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)); -- cgit v1.2.3-70-g09d2