summaryrefslogtreecommitdiff
path: root/src/lib/edje
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2016-12-20 16:03:11 -0800
committerCedric BAIL <cedric@osg.samsung.com>2016-12-20 16:39:30 -0800
commita5804c970da22264808f6d0a7133a985cb9911ef (patch)
tree20c1591c29b0be98f3db37c8809c765b4aec0bc2 /src/lib/edje
parent4c465772f9be51da1cdb555d6eb7f60183ed35d9 (diff)
edje: fix float comparison warning in vector loading logic.
Hum, there is no use of our fixed point infrastructure for vector.
Diffstat (limited to 'src/lib/edje')
-rw-r--r--src/lib/edje/edje_load.c3
-rw-r--r--src/lib/edje/edje_util.c14
2 files changed, 9 insertions, 8 deletions
diff --git a/src/lib/edje/edje_load.c b/src/lib/edje/edje_load.c
index 91695b2aa1..e530926c33 100644
--- a/src/lib/edje/edje_load.c
+++ b/src/lib/edje/edje_load.c
@@ -2876,7 +2876,8 @@ _edje_dupe_vector_data(Edje *ed, int svg_id, double width, double height,
2876 root = evas_vg_container_add(NULL); 2876 root = evas_vg_container_add(NULL);
2877 efl_vg_dup(root, vector->vg); 2877 efl_vg_dup(root, vector->vg);
2878 2878
2879 if (vector->w && vector->h) 2879 if (!EINA_DBL_CMP(vector->w, 0) &&
2880 !EINA_DBL_CMP(vector->h, 0))
2880 { 2881 {
2881 _apply_transformation(root, width, height, vector); 2882 _apply_transformation(root, width, height, vector);
2882 } 2883 }
diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c
index 83c37d5859..e9cead7505 100644
--- a/src/lib/edje/edje_util.c
+++ b/src/lib/edje/edje_util.c
@@ -338,7 +338,7 @@ edje_scale_set(double scale)
338{ 338{
339 Edje *ed; 339 Edje *ed;
340 340
341 if (_edje_scale == FROM_DOUBLE(scale)) return; 341 if (EQ(_edje_scale, FROM_DOUBLE(scale))) return;
342 _edje_scale = FROM_DOUBLE(scale); 342 _edje_scale = FROM_DOUBLE(scale);
343 EINA_INLIST_FOREACH(_edje_edjes, ed) edje_object_calc_force(ed->obj); 343 EINA_INLIST_FOREACH(_edje_edjes, ed) edje_object_calc_force(ed->obj);
344} 344}
@@ -359,7 +359,7 @@ edje_password_show_last_set(Eina_Bool password_show_last)
359EAPI void 359EAPI void
360edje_password_show_last_timeout_set(double password_show_last_timeout) 360edje_password_show_last_timeout_set(double password_show_last_timeout)
361{ 361{
362 if (_edje_password_show_last_timeout == password_show_last_timeout) return; 362 if (EINA_DBL_CMP(_edje_password_show_last_timeout, password_show_last_timeout)) return;
363 _edje_password_show_last_timeout = password_show_last_timeout; 363 _edje_password_show_last_timeout = password_show_last_timeout;
364} 364}
365 365
@@ -371,7 +371,7 @@ _edje_object_scale_set(Eo *obj EINA_UNUSED, Edje *ed, double scale)
371 Eina_List *l; 371 Eina_List *l;
372 unsigned short i; 372 unsigned short i;
373 373
374 if (ed->scale == scale) return EINA_TRUE; 374 if (EQ(ed->scale, FROM_DOUBLE(scale))) return EINA_TRUE;
375 ed->scale = FROM_DOUBLE(scale); 375 ed->scale = FROM_DOUBLE(scale);
376 EINA_LIST_FOREACH(ed->groups, l, ged) 376 EINA_LIST_FOREACH(ed->groups, l, ged)
377 edje_object_scale_set(ged->obj, scale); 377 edje_object_scale_set(ged->obj, scale);
@@ -4138,7 +4138,7 @@ _edje_object_part_drag_value_set(Eo *obj EINA_UNUSED, Edje *ed, const char *part
4138 } 4138 }
4139 if (rp->part->dragable.x < 0) dx = 1.0 - dx; 4139 if (rp->part->dragable.x < 0) dx = 1.0 - dx;
4140 if (rp->part->dragable.y < 0) dy = 1.0 - dy; 4140 if (rp->part->dragable.y < 0) dy = 1.0 - dy;
4141 if ((rp->drag->val.x == FROM_DOUBLE(dx)) && (rp->drag->val.y == FROM_DOUBLE(dy))) 4141 if (EQ(rp->drag->val.x, FROM_DOUBLE(dx)) && EQ(rp->drag->val.y, FROM_DOUBLE(dy)))
4142 { 4142 {
4143 return EINA_TRUE; 4143 return EINA_TRUE;
4144 } 4144 }
@@ -4222,7 +4222,7 @@ _edje_object_part_drag_size_set(Eo *obj EINA_UNUSED, Edje *ed, const char *part,
4222 if (dh < 0.0) dh = 0.0; 4222 if (dh < 0.0) dh = 0.0;
4223 else if (dh > 1.0) 4223 else if (dh > 1.0)
4224 dh = 1.0; 4224 dh = 1.0;
4225 if ((rp->drag->size.x == FROM_DOUBLE(dw)) && (rp->drag->size.y == FROM_DOUBLE(dh))) 4225 if (EQ(rp->drag->size.x, FROM_DOUBLE(dw)) && EQ(rp->drag->size.y, FROM_DOUBLE(dh)))
4226 { 4226 {
4227 return EINA_TRUE; 4227 return EINA_TRUE;
4228 } 4228 }
@@ -4449,7 +4449,7 @@ _edje_object_part_drag_step(Eo *obj EINA_UNUSED, Edje *ed, const char *part, dou
4449 MUL(rp->drag->step.y, rp->part->dragable.y))); 4449 MUL(rp->drag->step.y, rp->part->dragable.y)));
4450 rp->drag->val.x = CLAMP(rp->drag->val.x, ZERO, FROM_DOUBLE(1.0)); 4450 rp->drag->val.x = CLAMP(rp->drag->val.x, ZERO, FROM_DOUBLE(1.0));
4451 rp->drag->val.y = CLAMP(rp->drag->val.y, ZERO, FROM_DOUBLE(1.0)); 4451 rp->drag->val.y = CLAMP(rp->drag->val.y, ZERO, FROM_DOUBLE(1.0));
4452 if ((px == rp->drag->val.x) && (py == rp->drag->val.y)) 4452 if (EQ(px, rp->drag->val.x) && EQ(py, rp->drag->val.y))
4453 { 4453 {
4454 return EINA_TRUE; 4454 return EINA_TRUE;
4455 } 4455 }
@@ -4499,7 +4499,7 @@ _edje_object_part_drag_page(Eo *obj EINA_UNUSED, Edje *ed, const char *part, dou
4499 rp->drag->val.y = ADD(py, MUL(FROM_DOUBLE(dy), MUL(rp->drag->page.y, rp->part->dragable.y))); 4499 rp->drag->val.y = ADD(py, MUL(FROM_DOUBLE(dy), MUL(rp->drag->page.y, rp->part->dragable.y)));
4500 rp->drag->val.x = CLAMP(rp->drag->val.x, ZERO, FROM_DOUBLE(1.0)); 4500 rp->drag->val.x = CLAMP(rp->drag->val.x, ZERO, FROM_DOUBLE(1.0));
4501 rp->drag->val.y = CLAMP(rp->drag->val.y, ZERO, FROM_DOUBLE(1.0)); 4501 rp->drag->val.y = CLAMP(rp->drag->val.y, ZERO, FROM_DOUBLE(1.0));
4502 if ((px == rp->drag->val.x) && (py == rp->drag->val.y)) 4502 if (EQ(px, rp->drag->val.x) && EQ(py, rp->drag->val.y))
4503 { 4503 {
4504 return EINA_TRUE; 4504 return EINA_TRUE;
4505 } 4505 }