Skip to content

Commit

Permalink
Beta version 3.7.5: Fix MSVC x64 Release build.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed May 13, 2022
1 parent 5f91a97 commit b5bc567
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Telegram/SourceFiles/passport/passport_form_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
6 changes: 6 additions & 0 deletions Telegram/SourceFiles/passport/passport_panel_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b5bc567

Please sign in to comment.