diff options
author | saturneric <[email protected]> | 2024-12-03 09:42:14 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-12-03 09:42:14 +0000 |
commit | f4525ea80237bbb57ab7e3ab196fb3e85a4b05bb (patch) | |
tree | f0dc58c1e4740f79640fbdadcbf68563ec59b9df /src/ui/main_window/MainWindowGpgOperaFunction.cpp | |
parent | fix: variable 'mods_path' is reassigned a value before the old one has been u... (diff) | |
download | GpgFrontend-f4525ea80237bbb57ab7e3ab196fb3e85a4b05bb.tar.gz GpgFrontend-f4525ea80237bbb57ab7e3ab196fb3e85a4b05bb.zip |
fix: compiler warnings
Diffstat (limited to 'src/ui/main_window/MainWindowGpgOperaFunction.cpp')
-rw-r--r-- | src/ui/main_window/MainWindowGpgOperaFunction.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/ui/main_window/MainWindowGpgOperaFunction.cpp b/src/ui/main_window/MainWindowGpgOperaFunction.cpp index 776801e5..a9a65797 100644 --- a/src/ui/main_window/MainWindowGpgOperaFunction.cpp +++ b/src/ui/main_window/MainWindowGpgOperaFunction.cpp @@ -102,9 +102,8 @@ void MainWindow::SlotEncrypt() { auto keys = GpgKeyGetter::GetInstance(m_key_list_->GetCurrentGpgContextChannel()) .GetKeys(key_ids); - for (const auto& key : *keys) { - assert(key.IsGood()); - } + assert(std::all_of(keys->begin(), keys->end(), + [](const auto& key) { return key.IsGood(); })); for (const auto& key : *keys) { if (!key.IsHasActualEncryptionCapability()) { @@ -168,9 +167,8 @@ void MainWindow::SlotSign() { auto keys = GpgKeyGetter::GetInstance(m_key_list_->GetCurrentGpgContextChannel()) .GetKeys(key_ids); - for (const auto& key : *keys) { - assert(key.IsGood()); - } + assert(std::all_of(keys->begin(), keys->end(), + [](const auto& key) { return key.IsGood(); })); for (const auto& key : *keys) { if (!key.IsHasActualSigningCapability()) { @@ -384,9 +382,8 @@ void MainWindow::SlotEncryptSign() { auto keys = GpgKeyGetter::GetInstance(m_key_list_->GetCurrentGpgContextChannel()) .GetKeys(key_ids); - for (const auto& key : *keys) { - assert(key.IsGood()); - } + assert(std::all_of(keys->begin(), keys->end(), + [](const auto& key) { return key.IsGood(); })); for (const auto& key : *keys) { bool key_can_encrypt = key.IsHasActualEncryptionCapability(); |