summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2020-05-09 09:25:11 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-05-09 09:25:11 +0100
commit477bfd19ea43102cdfc8845343dd8a42ace08f59 (patch)
tree31f6860e7d9dc7e09d44bef0163d202048bd4e7e /src/bin
parent9cd18f3de6185589b6a343cac7a77951ceca82f4 (diff)
edje_cc: consistently use eina macros for all float comparisons
Summary: Depends on D11787 Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11788
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/edje/edje_cc_handlers.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index 22de13bf88..16996932ff 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -8304,7 +8304,7 @@ st_collections_group_parts_part_description_inherit(void)
8304 exit(-1); 8304 exit(-1);
8305 } 8305 }
8306 8306
8307 if (!strcmp(parent_name, "default") && parent_val == 0.0) 8307 if (!strcmp(parent_name, "default") && EINA_DBL_EQ(parent_val, 0.0))
8308 parent = ep->default_desc; 8308 parent = ep->default_desc;
8309 else 8309 else
8310 { 8310 {
@@ -8335,7 +8335,7 @@ st_collections_group_parts_part_description_inherit(void)
8335 } 8335 }
8336 } 8336 }
8337 8337
8338 if (min_dst) 8338 if (EINA_DBL_NONZERO(min_dst))
8339 { 8339 {
8340 WRN("%s:%i: couldn't find an exact match in part '%s' when looking for '%s' %lf. Falling back to nearest one '%s' %lf.", 8340 WRN("%s:%i: couldn't find an exact match in part '%s' when looking for '%s' %lf. Falling back to nearest one '%s' %lf.",
8341 file_in, line - 1, ep->name, parent_name, parent_val, parent ? parent->state.name : NULL, parent ? parent->state.value : 0); 8341 file_in, line - 1, ep->name, parent_name, parent_val, parent ? parent->state.name : NULL, parent ? parent->state.value : 0);
@@ -8569,8 +8569,8 @@ _part_description_state_update(Edje_Part_Description_Common *ed)
8569 Edje_Part *ep = current_part; 8569 Edje_Part *ep = current_part;
8570 8570
8571 if (ed == ep->default_desc) return; 8571 if (ed == ep->default_desc) return;
8572 if ((ep->default_desc->state.name && !strcmp(ed->state.name, ep->default_desc->state.name) && ed->state.value == ep->default_desc->state.value) || 8572 if ((ep->default_desc->state.name && !strcmp(ed->state.name, ep->default_desc->state.name) && EINA_DBL_EQ(ed->state.value, ep->default_desc->state.value)) ||
8573 (!ep->default_desc->state.name && !strcmp(ed->state.name, "default") && ed->state.value == ep->default_desc->state.value)) 8573 (!ep->default_desc->state.name && !strcmp(ed->state.name, "default") && EINA_DBL_EQ(ed->state.value, ep->default_desc->state.value)))
8574 { 8574 {
8575 if (ep->type == EDJE_PART_TYPE_IMAGE) 8575 if (ep->type == EDJE_PART_TYPE_IMAGE)
8576 _edje_part_description_image_remove((Edje_Part_Description_Image *)ed); 8576 _edje_part_description_image_remove((Edje_Part_Description_Image *)ed);
@@ -8586,7 +8586,7 @@ _part_description_state_update(Edje_Part_Description_Common *ed)
8586 unsigned int i; 8586 unsigned int i;
8587 for (i = 0; i < ep->other.desc_count - 1; ++i) 8587 for (i = 0; i < ep->other.desc_count - 1; ++i)
8588 { 8588 {
8589 if (!strcmp(ed->state.name, ep->other.desc[i]->state.name) && ed->state.value == ep->other.desc[i]->state.value) 8589 if (!strcmp(ed->state.name, ep->other.desc[i]->state.name) && EINA_DBL_EQ(ed->state.value, ep->other.desc[i]->state.value))
8590 { 8590 {
8591 if (ep->type == EDJE_PART_TYPE_IMAGE) 8591 if (ep->type == EDJE_PART_TYPE_IMAGE)
8592 _edje_part_description_image_remove((Edje_Part_Description_Image *)ed); 8592 _edje_part_description_image_remove((Edje_Part_Description_Image *)ed);
@@ -8645,7 +8645,7 @@ st_collections_group_parts_part_description_state(void)
8645 val = parse_float_range(1, 0.0, 1.0); 8645 val = parse_float_range(1, 0.0, 1.0);
8646 8646
8647 /* if only default desc exists and current desc is not default, commence paddling */ 8647 /* if only default desc exists and current desc is not default, commence paddling */
8648 if ((!ep->other.desc_count) && (val || (!eina_streq(s, "default")))) 8648 if ((!ep->other.desc_count) && (EINA_DBL_NONZERO(val) || (!eina_streq(s, "default"))))
8649 { 8649 {
8650 ERR("parse error %s:%i. invalid state name: '%s'. \"default\" state must always be first.", 8650 ERR("parse error %s:%i. invalid state name: '%s'. \"default\" state must always be first.",
8651 file_in, line - 1, s); 8651 file_in, line - 1, s);
@@ -15135,7 +15135,7 @@ edje_cc_handlers_wildcard(void)
15135 15135
15136 if (((!!ed->state.name) != (!!current_desc->state.name)) || 15136 if (((!!ed->state.name) != (!!current_desc->state.name)) ||
15137 (ed->state.name && strcmp(ed->state.name, current_desc->state.name)) || 15137 (ed->state.name && strcmp(ed->state.name, current_desc->state.name)) ||
15138 (fabs(ed->state.value - st) > DBL_EPSILON)) continue; 15138 (!EINA_DBL_EQ(ed->state.value, st))) continue;
15139 current_desc = ed; 15139 current_desc = ed;
15140 break; 15140 break;
15141 } 15141 }