forked from enlightenment/efl
edje_cc: fix comparisons for possible non-float values
Summary: when defined, BUILD_EDJE_FP causes some of these struct members to not be floating types and additionally defines special macros to be used for comparisons to handle this case Depends on D11786 Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11787
This commit is contained in:
parent
e0e1dc5f6f
commit
9cd18f3de6
|
@ -3554,7 +3554,7 @@ st_collections_base_scale(void)
|
|||
check_min_arg_count(1);
|
||||
|
||||
edje_file->base_scale = FROM_DOUBLE(parse_float_range(0, 0.0, 999999999.0));
|
||||
if (edje_file->base_scale == ZERO)
|
||||
if (EQ(edje_file->base_scale, ZERO))
|
||||
{
|
||||
ERR("The base_scale is 0.0. The value should be bigger than 0.0.");
|
||||
exit(-1);
|
||||
|
@ -4015,12 +4015,12 @@ _link_combine(void)
|
|||
EINA_LIST_FOREACH_SAFE(tup->data, l, ll, ell)
|
||||
{
|
||||
if (ell->pr->tween.mode != el->pr->tween.mode) continue;
|
||||
if (fabs(ell->pr->tween.time - el->pr->tween.time) > DBL_EPSILON) continue;
|
||||
if (fabs(ell->pr->tween.v1 - el->pr->tween.v1) > DBL_EPSILON) continue;
|
||||
if (fabs(ell->pr->tween.v2 - el->pr->tween.v2) > DBL_EPSILON) continue;
|
||||
if (fabs(ell->pr->tween.v3 - el->pr->tween.v3) > DBL_EPSILON) continue;
|
||||
if (fabs(ell->pr->tween.v4 - el->pr->tween.v4) > DBL_EPSILON) continue;
|
||||
if (fabs(ell->ed->state.value - el->ed->state.value) > DBL_EPSILON) continue;
|
||||
if (!EQ(ell->pr->tween.time, el->pr->tween.time)) continue;
|
||||
if (!EQ(ell->pr->tween.v1, el->pr->tween.v1)) continue;
|
||||
if (!EQ(ell->pr->tween.v2, el->pr->tween.v2)) continue;
|
||||
if (!EQ(ell->pr->tween.v3, el->pr->tween.v3)) continue;
|
||||
if (!EQ(ell->pr->tween.v4, el->pr->tween.v4)) continue;
|
||||
if (!EQ(ell->ed->state.value, el->ed->state.value)) continue;
|
||||
if ((!!ell->ed->state.name) != (!!el->ed->state.name))
|
||||
{
|
||||
if (((!!ell->ed->state.name) && strcmp(ell->ed->state.name, "default")) ||
|
||||
|
|
|
@ -1948,7 +1948,7 @@ _calcf(char op, double a, double b)
|
|||
return a;
|
||||
|
||||
case '/':
|
||||
if (b != 0) a /= b;
|
||||
if (EINA_DBL_NONZERO(b)) a /= b;
|
||||
else
|
||||
ERR("%s:%i divide by zero", file_in, line - 1);
|
||||
return a;
|
||||
|
@ -1958,7 +1958,7 @@ _calcf(char op, double a, double b)
|
|||
return a;
|
||||
|
||||
case '%':
|
||||
if (0 != b) a = (double)((int)a % (int)b);
|
||||
if (EINA_DBL_NONZERO(b)) a = (double)((int)a % (int)b);
|
||||
else
|
||||
ERR("%s:%i modula by zero", file_in, line - 1);
|
||||
return a;
|
||||
|
|
Loading…
Reference in New Issue