Beta version 3.7.5: Fix MSVC x64 Release build.

This commit is contained in:
John Preston 2022-05-13 12:26:26 +04:00
parent 5f91a97778
commit b5bc567eb8
2 changed files with 12 additions and 1 deletions

View file

@ -995,12 +995,17 @@ void FormController::recoverPassword() {
.hasRecovery = _password.hasRecovery,
.pendingResetDate = _password.pendingResetDate,
};
// MSVC x64 (non-LTO) Release build fails with a linker error:
// - unresolved external variant::variant(variant const &)
// It looks like a MSVC bug and this works like a workaround.
const auto force = fields.mtp.newSecureSecretAlgo;
const auto box = _view->show(Box<RecoverBox>(
&_controller->session().mtp(),
&_controller->session(),
pattern,
fields));
box->newPasswordSet(
) | rpl::start_with_next([=](const QByteArray &password) {
if (password.isEmpty()) {

View file

@ -690,6 +690,12 @@ void PanelController::setupPassword() {
.hasRecovery = settings.hasRecovery,
.pendingResetDate = settings.pendingResetDate,
};
// MSVC x64 (non-LTO) Release build fails with a linker error:
// - unresolved external variant::variant(variant const &)
// It looks like a MSVC bug and this works like a workaround.
const auto force = fields.mtp.newSecureSecretAlgo;
auto box = show(Box<PasscodeBox>(&_form->window()->session(), fields));
box->newPasswordSet(
) | rpl::start_with_next([=](const QByteArray &password) {