mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Instantiate QRegularExpression instances statically
This commit is contained in:
@@ -169,7 +169,8 @@ void PhoneWidget::submit() {
|
||||
|
||||
// Check if such account is authorized already.
|
||||
const auto digitsOnly = [](QString value) {
|
||||
return value.replace(QRegularExpression("[^0-9]"), QString());
|
||||
static const auto RegExp = QRegularExpression("[^0-9]");
|
||||
return value.replace(RegExp, QString());
|
||||
};
|
||||
const auto phoneDigits = digitsOnly(phone);
|
||||
for (const auto &[index, existing] : Core::App().domain().accounts()) {
|
||||
|
Reference in New Issue
Block a user