From 3d5bff624aa23bdf6521d15449b385558fff5a8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Fri, 12 Apr 2024 15:23:05 +0200 Subject: Fix compatibility with C++17. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- kmail/keyresolver.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'kmail/keyresolver.cpp') diff --git a/kmail/keyresolver.cpp b/kmail/keyresolver.cpp index 68187d2a2..c0b0cf692 100644 --- a/kmail/keyresolver.cpp +++ b/kmail/keyresolver.cpp @@ -335,7 +335,7 @@ static std::vector trustedOrConfirmed( const std::vector } namespace { - struct IsNotForFormat : public std::unary_function { + struct IsNotForFormat : public std::function { IsNotForFormat( Kleo::CryptoMessageFormat f ) : format( f ) {} bool operator()( const GpgME::Key & key ) const { @@ -347,7 +347,7 @@ namespace { const Kleo::CryptoMessageFormat format; }; - struct IsForFormat : std::unary_function { + struct IsForFormat : std::function { explicit IsForFormat( Kleo::CryptoMessageFormat f ) : protocol( isOpenPGP( f ) ? GpgME::Context::OpenPGP : isSMIME( f ) ? GpgME::Context::CMS : @@ -364,7 +364,7 @@ namespace { -class Kleo::KeyResolver::SigningPreferenceCounter : public std::unary_function { +class Kleo::KeyResolver::SigningPreferenceCounter : public std::function { public: SigningPreferenceCounter() : mTotal( 0 ), @@ -409,7 +409,7 @@ void Kleo::KeyResolver::SigningPreferenceCounter::operator()( const Kleo::KeyRes -class Kleo::KeyResolver::EncryptionPreferenceCounter : public std::unary_function { +class Kleo::KeyResolver::EncryptionPreferenceCounter : public std::function { const Kleo::KeyResolver * _this; public: EncryptionPreferenceCounter( const Kleo::KeyResolver * kr, EncryptionPreference defaultPreference ) @@ -476,7 +476,7 @@ void Kleo::KeyResolver::EncryptionPreferenceCounter::operator()( Item & item ) { namespace { - class FormatPreferenceCounterBase : public std::unary_function { + class FormatPreferenceCounterBase : public std::function { public: FormatPreferenceCounterBase() : mTotal( 0 ), -- cgit v1.2.1