summary refs log tree commit diff
path: root/src/encryption/SelfVerificationStatus.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2022-10-02 02:06:09 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2022-10-02 02:06:09 +0200
commita55fc8e43ba88ae33dd15838bd3de84b7238fc7a (patch)
treef19d77a0c00429da2b1eea488884e8bc296bc818 /src/encryption/SelfVerificationStatus.cpp
parentFix a few more warnings (diff)
downloadnheko-a55fc8e43ba88ae33dd15838bd3de84b7238fc7a.tar.xz
Work around MSVC bug with structured bindings in lambdas
Causes error messages like:
error C3493: 'key_id' cannot be implicitly captured because no default capture mode has been specified
Diffstat (limited to 'src/encryption/SelfVerificationStatus.cpp')
-rw-r--r--src/encryption/SelfVerificationStatus.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/encryption/SelfVerificationStatus.cpp b/src/encryption/SelfVerificationStatus.cpp

index 46e71015..86733cee 100644 --- a/src/encryption/SelfVerificationStatus.cpp +++ b/src/encryption/SelfVerificationStatus.cpp
@@ -172,14 +172,30 @@ SelfVerificationStatus::setupCrosssigning(bool useSSSS, QString password, bool u static_cast<int>(err->status_code)); } - for (const auto &[user_id, tmp] : res.errors) - for (const auto &[key_id, e_] : tmp) + // MSVC bug, error C3493: 'key_id' cannot be implicitly captured because no + // default capture mode has been specified + // for (const auto &[user_id, tmp] : res.errors) + // for (const auto &[key_id, e_] : tmp) + // nhlog::net()->error("signature error for user {} and key " + // "id {}: {}, {}", + // user_id, + // key_id, + // mtx::errors::to_string(e_.errcode), + // e_.error); + for (const auto &error : res.errors) { + const auto &user_id = error.first; + for (const auto &key_error : error.second) { + const auto &key_id = key_error.first; + const auto &e_ = key_error.second; + nhlog::net()->error("signature error for user {} and key " "id {}: {}, {}", user_id, key_id, mtx::errors::to_string(e_.errcode), e_.error); + } + } }); } }