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/configuration.cpp | 214 +---------------------------------------- 1 file changed, 5 insertions(+), 209 deletions(-) (limited to 'lang/cpp/src/configuration.cpp') diff --git a/lang/cpp/src/configuration.cpp b/lang/cpp/src/configuration.cpp index fc19020e..8a23efcf 100644 --- a/lang/cpp/src/configuration.cpp +++ b/lang/cpp/src/configuration.cpp @@ -20,8 +20,6 @@ Boston, MA 02110-1301, USA. */ -#include - #include "configuration.h" #include "error.h" #include "util.h" @@ -58,7 +56,6 @@ struct nodelete { std::vector Component::load(Error &returnedError) { -#ifdef HAVE_GPGME_PROTOCOL_GPGCONF // // 1. get a context: // @@ -101,16 +98,11 @@ std::vector Component::load(Error &returnedError) } return result; -#else - returnedError = Error(make_error(GPG_ERR_NOT_SUPPORTED)); - return std::vector(); -#endif } Error Component::save() const { -#ifdef HAVE_GPGME_PROTOCOL_GPGCONF if (isNull()) { return Error(make_error(GPG_ERR_INV_ARG)); } @@ -128,41 +120,25 @@ Error Component::save() const // 2. save the config: // return Error(gpgme_op_conf_save(ctx.get(), comp.get())); -#else - return Error(make_error(GPG_ERR_NOT_SUPPORTED)); -#endif } const char *Component::name() const { -#ifdef HAVE_GPGME_PROTOCOL_GPGCONF return comp ? comp->name : 0 ; -#else - return 0; -#endif } const char *Component::description() const { -#ifdef HAVE_GPGME_PROTOCOL_GPGCONF return comp ? comp->description : 0 ; -#else - return 0; -#endif } const char *Component::programName() const { -#ifdef HAVE_GPGME_PROTOCOL_GPGCONF return comp ? comp->program_name : 0 ; -#else - return 0; -#endif } Option Component::option(unsigned int idx) const { -#ifdef HAVE_GPGME_PROTOCOL_GPGCONF gpgme_conf_opt_t opt = 0; if (comp) { opt = comp->options; @@ -173,17 +149,12 @@ Option Component::option(unsigned int idx) const } if (opt) { return Option(comp, opt); - } else { -#endif - return Option(); -#ifdef HAVE_GPGME_PROTOCOL_GPGCONF } -#endif + return Option(); } Option Component::option(const char *name) const { -#ifdef HAVE_GPGME_PROTOCOL_GPGCONF gpgme_conf_opt_t opt = 0; if (comp) { opt = comp->options; @@ -194,37 +165,28 @@ Option Component::option(const char *name) const } if (opt) { return Option(comp, opt); - } else { -#endif - return Option(); -#ifdef HAVE_GPGME_PROTOCOL_GPGCONF } -#endif + return Option(); } unsigned int Component::numOptions() const { unsigned int result = 0; -#ifdef HAVE_GPGME_PROTOCOL_GPGCONF for (gpgme_conf_opt_t opt = comp ? comp->options : 0 ; opt ; opt = opt->next) { ++result; } -#endif return result; } std::vector