summaryrefslogtreecommitdiff
path: root/src/lib/edje
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2016-12-20 16:01:01 -0800
committerCedric BAIL <cedric@osg.samsung.com>2016-12-20 16:39:30 -0800
commit48fb9856c03a4a9b15abf85c948e23814bb38174 (patch)
tree815d3202db27b39c16007db18ba45796ee618434 /src/lib/edje
parent14d7ec478cf5b7fbb61346a7da15faf90910b59d (diff)
edje: fix float comparison warning in edje text logic.
Diffstat (limited to 'src/lib/edje')
-rw-r--r--src/lib/edje/edje_entry.c2
-rw-r--r--src/lib/edje/edje_text.c10
-rw-r--r--src/lib/edje/edje_textblock_styles.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c
index b836e9596e..b9fb8b8d19 100644
--- a/src/lib/edje/edje_entry.c
+++ b/src/lib/edje/edje_entry.c
@@ -2582,7 +2582,7 @@ _edje_part_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_
2582 d = (r2->y + (r2->h / 2)) - cy; 2582 d = (r2->y + (r2->h / 2)) - cy;
2583 d2 += d * d; 2583 d2 += d * d;
2584 sc = DIV(en->ed->scale, en->ed->file->base_scale); 2584 sc = DIV(en->ed->scale, en->ed->file->base_scale);
2585 if (sc == ZERO) sc = DIV(_edje_scale, en->ed->file->base_scale); 2585 if (EQ(sc, ZERO)) sc = DIV(_edje_scale, en->ed->file->base_scale);
2586 d = (Evas_Coord)MUL(FROM_INT(20), sc); // FIXME: maxing number! 2586 d = (Evas_Coord)MUL(FROM_INT(20), sc); // FIXME: maxing number!
2587 d = d * d; 2587 d = d * d;
2588 if (d1 < d2) 2588 if (d1 < d2)
diff --git a/src/lib/edje/edje_text.c b/src/lib/edje/edje_text.c
index 33b83f4153..3c3e1c14c3 100644
--- a/src/lib/edje/edje_text.c
+++ b/src/lib/edje/edje_text.c
@@ -125,7 +125,7 @@ _edje_text_fit_x(Edje *ed, Edje_Real_Part *ep,
125 FLOAT_T sc; 125 FLOAT_T sc;
126 126
127 sc = DIV(ed->scale, ed->file->base_scale); 127 sc = DIV(ed->scale, ed->file->base_scale);
128 if (sc == ZERO) sc = DIV(_edje_scale, ed->file->base_scale); 128 if (EQ(sc, ZERO)) sc = DIV(_edje_scale, ed->file->base_scale);
129 129
130 *free_text = 0; 130 *free_text = 0;
131 if (sw <= 1) return ""; 131 if (sw <= 1) return "";
@@ -217,7 +217,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
217 if ((ep->type != EDJE_RP_TYPE_TEXT) || 217 if ((ep->type != EDJE_RP_TYPE_TEXT) ||
218 (!ep->typedata.text)) return; 218 (!ep->typedata.text)) return;
219 sc = DIV(ed->scale, ed->file->base_scale); 219 sc = DIV(ed->scale, ed->file->base_scale);
220 if (sc == ZERO) sc = DIV(_edje_scale, ed->file->base_scale); 220 if (EQ(sc, ZERO)) sc = DIV(_edje_scale, ed->file->base_scale);
221 221
222 if (chosen_desc->text.domain) 222 if (chosen_desc->text.domain)
223 { 223 {
@@ -310,9 +310,9 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
310 (ep->typedata.text->cache.in_h == sh) && 310 (ep->typedata.text->cache.in_h == sh) &&
311 (ep->typedata.text->cache.in_str) && 311 (ep->typedata.text->cache.in_str) &&
312 same_text && 312 same_text &&
313 (ep->typedata.text->cache.align_x == params->type.text->align.x) && 313 (EQ(ep->typedata.text->cache.align_x, params->type.text->align.x)) &&
314 (ep->typedata.text->cache.align_y == params->type.text->align.y) && 314 (EQ(ep->typedata.text->cache.align_y, params->type.text->align.y)) &&
315 (ep->typedata.text->cache.ellipsis == params->type.text->ellipsis) && 315 (EQ(ep->typedata.text->cache.ellipsis, params->type.text->ellipsis)) &&
316 (ep->typedata.text->cache.fit_x == chosen_desc->text.fit_x) && 316 (ep->typedata.text->cache.fit_x == chosen_desc->text.fit_x) &&
317 (ep->typedata.text->cache.fit_y == chosen_desc->text.fit_y) && 317 (ep->typedata.text->cache.fit_y == chosen_desc->text.fit_y) &&
318 (ep->typedata.text->cache.in_font == font)) 318 (ep->typedata.text->cache.in_font == font))
diff --git a/src/lib/edje/edje_textblock_styles.c b/src/lib/edje/edje_textblock_styles.c
index e4d18510fb..06cd8cd775 100644
--- a/src/lib/edje/edje_textblock_styles.c
+++ b/src/lib/edje/edje_textblock_styles.c
@@ -220,7 +220,7 @@ _edje_textblock_style_update(Edje *ed, Edje_Style *stl, Eina_Bool force)
220 eina_strbuf_append(txt, "font_source="); 220 eina_strbuf_append(txt, "font_source=");
221 eina_strbuf_append(txt, fontsource); 221 eina_strbuf_append(txt, fontsource);
222 } 222 }
223 if (tag->font_size != 0) 223 if (!EINA_DBL_CMP(tag->font_size, 0))
224 { 224 {
225 char font_size[32]; 225 char font_size[32];
226 226