Squash a compiler warning that was also a potential defect

This commit is contained in:
Bill Somerville 2019-07-03 00:16:39 +01:00
parent a9fd073023
commit cee3c9796f
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F

View File

@ -10,7 +10,7 @@ QValidator::State RestrictedSpinBox::validate (QString& input, int& pos) const
// start by doing the standard QSpinBox validation // start by doing the standard QSpinBox validation
auto valid = HintedSpinBox::validate (input, pos); auto valid = HintedSpinBox::validate (input, pos);
// extra validation // extra validation
if (QValidator::Acceptable if (QValidator::Acceptable == valid
&& values ().end () == std::find (values ().begin (), values ().end (), valueFromText (input))) && values ().end () == std::find (values ().begin (), values ().end (), valueFromText (input)))
{ {
valid = QValidator::Intermediate; valid = QValidator::Intermediate;