summaryrefslogtreecommitdiff
path: root/src/lib/edje
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2016-12-20 16:02:02 -0800
committerCedric BAIL <cedric@osg.samsung.com>2016-12-20 16:39:30 -0800
commit4c465772f9be51da1cdb555d6eb7f60183ed35d9 (patch)
treeb080a6ade9bb37ab4ee71cf52412217d493f065a /src/lib/edje
parent48fb9856c03a4a9b15abf85c948e23814bb38174 (diff)
edje: fix float comparison warning in edje programs.
Diffstat (limited to 'src/lib/edje')
-rw-r--r--src/lib/edje/edje_program.c10
-rw-r--r--src/lib/edje/edje_var.c2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/edje/edje_program.c b/src/lib/edje/edje_program.c
index a2df439e87..695f57ccd8 100644
--- a/src/lib/edje/edje_program.c
+++ b/src/lib/edje/edje_program.c
@@ -678,7 +678,7 @@ _edje_program_run(Edje *ed, Edje_Program *pr, Eina_Bool force, const char *ssig,
678 { 678 {
679 ERR("Programs recursing up to recursion limit of %i in '%s' with sig='%s', src='%s' from '%s', '%s'. Disabled.", 679 ERR("Programs recursing up to recursion limit of %i in '%s' with sig='%s', src='%s' from '%s', '%s'. Disabled.",
680 64, pr->name, ssig, ssrc, ed->path, ed->group); 680 64, pr->name, ssig, ssrc, ed->path, ed->group);
681 if (pr->action == EDJE_ACTION_TYPE_STATE_SET && ((pr->tween.time == ZERO) || (ed->no_anim))) 681 if (pr->action == EDJE_ACTION_TYPE_STATE_SET && (EQ(pr->tween.time, ZERO) || (ed->no_anim)))
682 ERR("Possible solution: try adding transition time to prevent Schrödinger's part state"); 682 ERR("Possible solution: try adding transition time to prevent Schrödinger's part state");
683 recursion_limit = 1; 683 recursion_limit = 1;
684 return; 684 return;
@@ -1947,7 +1947,7 @@ _edje_param_native_set(Edje *ed, Edje_Real_Part *rp, const char *name, const Edj
1947 if (rp->part->dragable.confine_id != -1) 1947 if (rp->part->dragable.confine_id != -1)
1948 d = CLAMP(d, 0.0, 1.0); 1948 d = CLAMP(d, 0.0, 1.0);
1949 if (rp->part->dragable.x < 0) d = 1.0 - d; 1949 if (rp->part->dragable.x < 0) d = 1.0 - d;
1950 if (rp->drag->val.x == FROM_DOUBLE(d)) return EINA_TRUE; 1950 if (EQ(rp->drag->val.x, FROM_DOUBLE(d))) return EINA_TRUE;
1951 rp->drag->val.x = FROM_DOUBLE(d); 1951 rp->drag->val.x = FROM_DOUBLE(d);
1952#ifdef EDJE_CALC_CACHE 1952#ifdef EDJE_CALC_CACHE
1953 rp->invalidate = EINA_TRUE; 1953 rp->invalidate = EINA_TRUE;
@@ -1966,7 +1966,7 @@ _edje_param_native_set(Edje *ed, Edje_Real_Part *rp, const char *name, const Edj
1966 if (rp->part->dragable.confine_id != -1) 1966 if (rp->part->dragable.confine_id != -1)
1967 d = CLAMP(d, 0.0, 1.0); 1967 d = CLAMP(d, 0.0, 1.0);
1968 if (rp->part->dragable.y < 0) d = 1.0 - d; 1968 if (rp->part->dragable.y < 0) d = 1.0 - d;
1969 if (rp->drag->val.y == FROM_DOUBLE(d)) return EINA_TRUE; 1969 if (EQ(rp->drag->val.y, FROM_DOUBLE(d))) return EINA_TRUE;
1970 rp->drag->val.y = FROM_DOUBLE(d); 1970 rp->drag->val.y = FROM_DOUBLE(d);
1971#ifdef EDJE_CALC_CACHE 1971#ifdef EDJE_CALC_CACHE
1972 rp->invalidate = EINA_TRUE; 1972 rp->invalidate = EINA_TRUE;
@@ -2286,11 +2286,11 @@ _edje_param_validate(const Edje_External_Param *param, const Edje_External_Param
2286 return EINA_TRUE; 2286 return EINA_TRUE;
2287 2287
2288 case EDJE_EXTERNAL_PARAM_TYPE_DOUBLE: 2288 case EDJE_EXTERNAL_PARAM_TYPE_DOUBLE:
2289 if ((info->info.d.min != EDJE_EXTERNAL_DOUBLE_UNSET) && 2289 if (!EINA_DBL_CMP(info->info.d.min, EDJE_EXTERNAL_DOUBLE_UNSET) &&
2290 (info->info.d.min > param->d)) 2290 (info->info.d.min > param->d))
2291 return EINA_FALSE; 2291 return EINA_FALSE;
2292 2292
2293 if ((info->info.d.max != EDJE_EXTERNAL_DOUBLE_UNSET) && 2293 if (!EINA_DBL_CMP(info->info.d.max, EDJE_EXTERNAL_DOUBLE_UNSET) &&
2294 (info->info.d.max < param->d)) 2294 (info->info.d.max < param->d))
2295 return EINA_FALSE; 2295 return EINA_FALSE;
2296 2296
diff --git a/src/lib/edje/edje_var.c b/src/lib/edje/edje_var.c
index 6c2ddf26f3..3bc3ebf0b2 100644
--- a/src/lib/edje/edje_var.c
+++ b/src/lib/edje/edje_var.c
@@ -134,7 +134,7 @@ _edje_var_anim_cb(void *data EINA_UNUSED)
134 embryo_program_vm_pop(ed->collection->script); 134 embryo_program_vm_pop(ed->collection->script);
135 _edje_recalc(ed); 135 _edje_recalc(ed);
136 } 136 }
137 if (v == 1.0) ea->delete_me = 1; 137 if (EQ(v, FROM_INT(1))) ea->delete_me = 1;
138 } 138 }
139 } 139 }
140 tl2 = eina_list_remove(tl2, ea); 140 tl2 = eina_list_remove(tl2, ea);