mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-07-25 23:13:11 +02:00
Fix build for macOS / Linux.
This commit is contained in:
parent
663db64688
commit
889e0dc035
1 changed files with 4 additions and 4 deletions
|
@ -47,7 +47,7 @@ struct FieldValidateResult {
|
|||
bool finished = false;
|
||||
};
|
||||
|
||||
[[nodiscard]] auto RangeLengthValidator(int minLength, int maxLength) {
|
||||
[[nodiscard]] inline auto RangeLengthValidator(int minLength, int maxLength) {
|
||||
return [=](FieldValidateRequest request) {
|
||||
return FieldValidateResult{
|
||||
.value = request.nowValue,
|
||||
|
@ -58,15 +58,15 @@ struct FieldValidateResult {
|
|||
};
|
||||
}
|
||||
|
||||
[[nodiscard]] auto MaxLengthValidator(int maxLength) {
|
||||
[[nodiscard]] inline auto MaxLengthValidator(int maxLength) {
|
||||
return RangeLengthValidator(0, maxLength);
|
||||
}
|
||||
|
||||
[[nodiscard]] auto RequiredValidator() {
|
||||
[[nodiscard]] inline auto RequiredValidator() {
|
||||
return RangeLengthValidator(1, std::numeric_limits<int>::max());
|
||||
}
|
||||
|
||||
[[nodiscard]] auto RequiredFinishedValidator() {
|
||||
[[nodiscard]] inline auto RequiredFinishedValidator() {
|
||||
return [=](FieldValidateRequest request) {
|
||||
return FieldValidateResult{
|
||||
.value = request.nowValue,
|
||||
|
|
Loading…
Add table
Reference in a new issue