mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Fix build for macOS / Linux.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user