From 5d7b1d5493df8723259eca0613a9ce0af6077289 Mon Sep 17 00:00:00 2001 From: saturneric Date: Mon, 30 Oct 2023 14:52:29 +0800 Subject: style: improve code style of core --- src/core/function/gpg/GpgUIDOperator.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/core/function/gpg/GpgUIDOperator.cpp') diff --git a/src/core/function/gpg/GpgUIDOperator.cpp b/src/core/function/gpg/GpgUIDOperator.cpp index 8badb5d2..d74cea76 100644 --- a/src/core/function/gpg/GpgUIDOperator.cpp +++ b/src/core/function/gpg/GpgUIDOperator.cpp @@ -36,7 +36,7 @@ GpgFrontend::GpgUIDOperator::GpgUIDOperator(int channel) bool GpgFrontend::GpgUIDOperator::AddUID(const GpgFrontend::GpgKey& key, const std::string& uid) { auto err = gpgme_op_adduid(ctx_, gpgme_key_t(key), uid.c_str(), 0); - if (check_gpg_error_2_err_code(err) == GPG_ERR_NO_ERROR) + if (CheckGpgError(err) == GPG_ERR_NO_ERROR) return true; else return false; @@ -45,8 +45,8 @@ bool GpgFrontend::GpgUIDOperator::AddUID(const GpgFrontend::GpgKey& key, bool GpgFrontend::GpgUIDOperator::RevUID(const GpgFrontend::GpgKey& key, const std::string& uid) { auto err = - check_gpg_error(gpgme_op_revuid(ctx_, gpgme_key_t(key), uid.c_str(), 0)); - if (check_gpg_error_2_err_code(err) == GPG_ERR_NO_ERROR) + CheckGpgError(gpgme_op_revuid(ctx_, gpgme_key_t(key), uid.c_str(), 0)); + if (CheckGpgError(err) == GPG_ERR_NO_ERROR) return true; else return false; @@ -54,9 +54,9 @@ bool GpgFrontend::GpgUIDOperator::RevUID(const GpgFrontend::GpgKey& key, bool GpgFrontend::GpgUIDOperator::SetPrimaryUID(const GpgFrontend::GpgKey& key, const std::string& uid) { - auto err = check_gpg_error(gpgme_op_set_uid_flag( + auto err = CheckGpgError(gpgme_op_set_uid_flag( ctx_, gpgme_key_t(key), uid.c_str(), "primary", nullptr)); - if (check_gpg_error_2_err_code(err) == GPG_ERR_NO_ERROR) + if (CheckGpgError(err) == GPG_ERR_NO_ERROR) return true; else return false; -- cgit v1.2.3