From c419376b85ff4a489f3bf7ad97ed656495792523 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Thu, 8 Dec 2022 15:20:14 +0100 Subject: cpp: Handle statuses that need no response in the base edit interactor * lang/cpp/src/editinteractor.cpp (edit_interactor_callback_impl): Do not call nextState() if status needs no response. * lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp (GpgAddExistingSubkeyEditInteractor::Private::nextState), lang/cpp/src/gpgadduserideditinteractor.cpp (GpgAddUserIDEditInteractor::nextState), lang/cpp/src/gpggencardkeyinteractor.cpp (GpgGenCardKeyInteractor::nextState), lang/cpp/src/gpgrevokekeyeditinteractor.cpp (GpgRevokeKeyEditInteractor::Private::nextState), lang/cpp/src/gpgsetexpirytimeeditinteractor.cpp (GpgSetExpiryTimeEditInteractor::nextState), lang/cpp/src/gpgsetownertrusteditinteractor.cpp (GpgSetOwnerTrustEditInteractor::nextState), lang/cpp/src/gpgsignkeyeditinteractor.cpp (GpgSignKeyEditInteractor::nextState): Remove handling of statuses that need no response. -- This change removes superfluous code duplication. GnuPG-bug-id: 6305 --- lang/cpp/src/gpgsetownertrusteditinteractor.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'lang/cpp/src/gpgsetownertrusteditinteractor.cpp') diff --git a/lang/cpp/src/gpgsetownertrusteditinteractor.cpp b/lang/cpp/src/gpgsetownertrusteditinteractor.cpp index f1e99ea9..e28951ba 100644 --- a/lang/cpp/src/gpgsetownertrusteditinteractor.cpp +++ b/lang/cpp/src/gpgsetownertrusteditinteractor.cpp @@ -98,10 +98,6 @@ unsigned int GpgSetOwnerTrustEditInteractor::nextState(unsigned int status, cons static const Error GENERAL_ERROR = Error::fromCode(GPG_ERR_GENERAL); //static const Error INV_TIME_ERROR = Error::fromCode( GPG_ERR_INV_TIME ); - if (needsNoResponse(status)) { - return state(); - } - using namespace GpgSetOwnerTrustEditInteractor_Private; switch (state()) { -- cgit v1.2.3