mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-10-30 09:30:47 +03:00
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
This commit is contained in:
parent
b55b5a8321
commit
a55fc8e43b
2 changed files with 36 additions and 4 deletions
|
@ -336,14 +336,30 @@ DeviceVerificationFlow::DeviceVerificationFlow(QObject *,
|
|||
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);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue