From 433bb8e84b2d1e50b5c5b9f7f2006b60cd7d7785 Mon Sep 17 00:00:00 2001 From: Andre Heinecke Date: Mon, 22 Feb 2016 19:07:41 +0100 Subject: Remove feature check ifdefs * lang/cpp/src/assuanresult.cpp, lang/cpp/src/callbacks.cpp, lang/cpp/src/configuration.cpp, lang/cpp/src/context.cpp, lang/cpp/src/context_glib.cpp, lang/cpp/src/context_qt.cpp, lang/cpp/src/context_vanilla.cpp, lang/cpp/src/data.cpp, lang/cpp/src/decryptionresult.cpp, lang/cpp/src/defaultassuantransaction.cpp, lang/cpp/src/editinteractor.cpp, lang/cpp/src/encryptionresult.cpp, lang/cpp/src/engineinfo.cpp, lang/cpp/src/eventloopinteractor.cpp, lang/cpp/src/global.h, lang/cpp/src/gpgagentgetinfoassuantransaction.cpp, lang/cpp/src/importresult.cpp, lang/cpp/src/interfaces/assuantransaction.h, lang/cpp/src/key.cpp, lang/cpp/src/keygenerationresult.cpp, lang/cpp/src/keylistresult.cpp, lang/cpp/src/scdgetinfoassuantransaction.cpp, lang/cpp/src/signingresult.cpp, lang/cpp/src/trustitem.cpp, lang/cpp/src/util.h, lang/cpp/src/verificationresult.cpp, lang/cpp/src/vfsmountresult.cpp: Remove feature checks. --- lang/cpp/src/util.h | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) (limited to 'lang/cpp/src/util.h') diff --git a/lang/cpp/src/util.h b/lang/cpp/src/util.h index ed526e13..8ccb0bf5 100644 --- a/lang/cpp/src/util.h +++ b/lang/cpp/src/util.h @@ -68,18 +68,10 @@ static inline gpgme_keylist_mode_t add_to_gpgme_keylist_mode_t(unsigned int oldm oldmode |= GPGME_KEYLIST_MODE_SIGS; } if (newmodes & GpgME::SignatureNotations) { -#ifdef HAVE_GPGME_KEYLIST_MODE_SIG_NOTATIONS oldmode |= GPGME_KEYLIST_MODE_SIG_NOTATIONS; -#elif !defined(NDEBUG) - ;//std::cerr << "GpgME: ignoring SignatureNotations keylist flag (gpgme too old)." << std::endl; -#endif } if (newmodes & GpgME::Ephemeral) { -#ifdef HAVE_GPGME_KEYLIST_MODE_EPHEMERAL oldmode |= GPGME_KEYLIST_MODE_EPHEMERAL; -#elif !defined(NDEBUG) - ;//std::cerr << "GpgME: ignoring Ephemeral keylist flag (gpgme too old)." << std::endl; -#endif } if (newmodes & GpgME::Validate) { oldmode |= GPGME_KEYLIST_MODE_VALIDATE; @@ -105,28 +97,20 @@ static inline unsigned int convert_from_gpgme_keylist_mode_t(unsigned int mode) if (mode & GPGME_KEYLIST_MODE_SIGS) { result |= GpgME::Signatures; } -#ifdef HAVE_GPGME_KEYLIST_MODE_SIG_NOTATIONS if (mode & GPGME_KEYLIST_MODE_SIG_NOTATIONS) { result |= GpgME::SignatureNotations; } -#endif -#ifdef HAVE_GPGME_KEYLIST_MODE_EPHEMERAL if (mode & GPGME_KEYLIST_MODE_EPHEMERAL) { result |= GpgME::Ephemeral; } -#endif if (mode & GPGME_KEYLIST_MODE_VALIDATE) { result |= GpgME::Validate; } #ifndef NDEBUG if (mode & ~(GPGME_KEYLIST_MODE_LOCAL | GPGME_KEYLIST_MODE_EXTERN | -#ifdef HAVE_GPGME_KEYLIST_MODE_SIG_NOTATIONS GPGME_KEYLIST_MODE_SIG_NOTATIONS | -#endif -#ifdef HAVE_GPGME_KEYLIST_MODE_EPHEMERAL GPGME_KEYLIST_MODE_EPHEMERAL | -#endif GPGME_KEYLIST_MODE_VALIDATE | GPGME_KEYLIST_MODE_SIGS)) { //std::cerr << "GpgME: WARNING: gpgme_get_keylist_mode() returned an unknown flag!" << std::endl; @@ -137,43 +121,26 @@ static inline unsigned int convert_from_gpgme_keylist_mode_t(unsigned int mode) static inline GpgME::Notation::Flags convert_from_gpgme_sig_notation_flags_t(unsigned int flags) { -#ifdef HAVE_GPGME_SIG_NOTATION_FLAGS_T unsigned int result = 0; -#ifdef HAVE_GPGME_SIG_NOTATION_HUMAN_READABLE if (flags & GPGME_SIG_NOTATION_HUMAN_READABLE) { result |= GpgME::Notation::HumanReadable ; } -#endif -#ifdef HAVE_GPGME_SIG_NOTATION_CRITICAL if (flags & GPGME_SIG_NOTATION_CRITICAL) { result |= GpgME::Notation::Critical ; } -#endif return static_cast(result); -#else - return GpgME::Notation::NoFlags; -#endif } -#ifdef HAVE_GPGME_SIG_NOTATION_FLAGS_T + static inline gpgme_sig_notation_flags_t add_to_gpgme_sig_notation_flags_t(unsigned int oldflags, unsigned int newflags) { unsigned int result = oldflags; if (newflags & GpgME::Notation::HumanReadable) { -#ifdef HAVE_GPGME_SIG_NOTATION_HUMAN_READABLE result |= GPGME_SIG_NOTATION_HUMAN_READABLE; -#elif !defined(NDEBUG) - //std::cerr << "GpgME::Context: ignoring HumanReadable signature notation flag (gpgme too old)" << std::endl; -#endif } if (newflags & GpgME::Notation::Critical) { -#ifdef HAVE_GPGME_SIG_NOTATION_CRITICAL result |= GPGME_SIG_NOTATION_CRITICAL; -#elif !defined(NDEBUG) - //std::cerr << "GpgME::Context: ignoring Critical signature notation flag (gpgme too old)" << std::endl; -#endif } return static_cast(result); } -#endif #endif // __GPGMEPP_UTIL_H__ -- cgit v1.2.3