Follow up: Adding new sla material parameters...

Small fix for redundant operations.
This commit is contained in:
tamasmeszaros 2019-08-20 16:00:26 +02:00
parent 7c94db0634
commit bafa4d6d19

View file

@ -3699,16 +3699,17 @@ void bound_check(Tab &tb, e_cmp cmp, const char *id, const char *boundid)
double ddiff = value - bound;
int diff = ddiff < 0 ? SMALLER : (std::abs(ddiff) < EPSILON ? EQUAL : GREATER);
wxString fmt;
switch (cmp) {
case EQUAL: fmt = _(L("%s should be equal to %s")); break;
case SMALLER: fmt = _(L("%s should be smaller than %s")); break;
case GREATER: fmt = _(L("%s should be greater than %s")); break;
case SMALLER_EQ: fmt = _(L("%s should be smaller or equal to %s")); break;
case GREATER_EQ: fmt = _(L("%s should be greater or equal to %s")); break;
}
if ((cmp | diff) != cmp) {
wxString fmt;
switch (cmp) {
case EQUAL: fmt = _(L("%s should be equal to %s")); break;
case SMALLER: fmt = _(L("%s should be smaller than %s")); break;
case GREATER: fmt = _(L("%s should be greater than %s")); break;
case SMALLER_EQ: fmt = _(L("%s should be smaller or equal to %s")); break;
case GREATER_EQ: fmt = _(L("%s should be greater or equal to %s")); break;
}
wxString msg_text = wxString::Format(fmt, valuelabel, boundlabel);
wxMessageDialog dialog(tb.parent(), msg_text,