Fix build for macOS / Linux.
This commit is contained in:
parent
f98f4f0d14
commit
1a5e807fa9
|
@ -46,7 +46,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,
|
||||
|
@ -57,15 +57,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…
Reference in New Issue