2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-01 07:05:13 +00:00

Replace base::lambda with shorter term.

base::lambda -> Fn (type alias for std::function).
base::lambda_once -> FnMut (type alias for base::unique_function).
base::lambda_guarded -> crl::guard.
base::lambda_call_type_t -> crl::deduced_call_type.
This commit is contained in:
John Preston
2018-06-04 18:35:11 +03:00
parent 8d1cdea31a
commit dd81f5d59f
216 changed files with 792 additions and 1455 deletions

View File

@@ -320,7 +320,7 @@ void PasscodeBox::save(bool force) {
}
if (!_recoverEmail->isHidden() && email.isEmpty() && !force) {
_skipEmailWarning = true;
_replacedBy = getDelegate()->show(Box<ConfirmBox>(lang(lng_cloud_password_about_recover), lang(lng_cloud_password_skip_email), st::attentionBoxButton, base::lambda_guarded(this, [this] {
_replacedBy = getDelegate()->show(Box<ConfirmBox>(lang(lng_cloud_password_about_recover), lang(lng_cloud_password_skip_email), st::attentionBoxButton, crl::guard(this, [this] {
save(true);
})));
} else if (_newPasscode->isHidden()) {
@@ -679,7 +679,7 @@ void RecoverBox::submit() {
return;
}
const auto send = base::lambda_guarded(this, [=] {
const auto send = crl::guard(this, [=] {
_submitRequest = MTP::send(
MTPauth_RecoverPassword(MTP_string(code)),
rpcDone(&RecoverBox::codeSubmitDone, true),