aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/key_generate/SubkeyGenerateDialog.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2023-10-25 10:26:26 +0000
committersaturneric <[email protected]>2023-10-25 10:26:26 +0000
commit124929609eabff19359caad276a10f1026793c0f (patch)
treec743376267928e60291b4f14bd78bd2b76f955c7 /src/ui/dialog/key_generate/SubkeyGenerateDialog.cpp
parentfeat: use rt listen publish event function in main windows' app version upgra... (diff)
downloadGpgFrontend-124929609eabff19359caad276a10f1026793c0f.tar.gz
GpgFrontend-124929609eabff19359caad276a10f1026793c0f.zip
fix: solve some code tidy issues
Diffstat (limited to 'src/ui/dialog/key_generate/SubkeyGenerateDialog.cpp')
-rw-r--r--src/ui/dialog/key_generate/SubkeyGenerateDialog.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ui/dialog/key_generate/SubkeyGenerateDialog.cpp b/src/ui/dialog/key_generate/SubkeyGenerateDialog.cpp
index d1c91692..b0c0e6ca 100644
--- a/src/ui/dialog/key_generate/SubkeyGenerateDialog.cpp
+++ b/src/ui/dialog/key_generate/SubkeyGenerateDialog.cpp
@@ -29,6 +29,7 @@
#include "SubkeyGenerateDialog.h"
#include <cassert>
+#include <cstddef>
#include "core/common/CoreCommonUtil.h"
#include "core/function/GlobalSettingStation.h"
@@ -381,7 +382,8 @@ void SubkeyGenerateDialog::slot_activated_key_type(int index) {
SPDLOG_DEBUG("key type index changed: {}", index);
// check
- assert(gen_key_info_->GetSupportedSubkeyAlgo().size() > index);
+ assert(gen_key_info_->GetSupportedSubkeyAlgo().size() >
+ static_cast<size_t>(index));
gen_key_info_->SetAlgo(gen_key_info_->GetSupportedSubkeyAlgo()[index]);
refresh_widgets_state();
}