summaryrefslogtreecommitdiff
path: root/src/examples/evas
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2020-05-12 09:21:09 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2020-05-12 16:10:02 +0200
commitd5b119a30a27eae27a9f85b5a818bd8608aa65ff (patch)
treedf55f87f77332443932c01994e6bf03f1de7de94 /src/examples/evas
parente893d1ab7e770b2d1df75a730a3778480c079033 (diff)
examples: resolve float compare warnings
Summary: Depends on D11795 Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11796
Diffstat (limited to 'src/examples/evas')
-rw-r--r--src/examples/evas/efl-canvas-vg-simple.c2
-rw-r--r--src/examples/evas/evas-box.c8
-rw-r--r--src/examples/evas/evas-gl.c2
-rw-r--r--src/examples/evas/evas-vg-batman.c2
-rw-r--r--src/examples/evas/evas-vg-simple.c2
5 files changed, 8 insertions, 8 deletions
diff --git a/src/examples/evas/efl-canvas-vg-simple.c b/src/examples/evas/efl-canvas-vg-simple.c
index 79a9645890..15d74aea86 100644
--- a/src/examples/evas/efl-canvas-vg-simple.c
+++ b/src/examples/evas/efl-canvas-vg-simple.c
@@ -411,7 +411,7 @@ _interpolation_keyframe(void *data EINA_UNUSED, double pos)
411 eina_list_nth(d.shape_list, next), 411 eina_list_nth(d.shape_list, next),
412 ecore_animator_pos_map(pos, ECORE_POS_MAP_SINUSOIDAL, 0.0, 0.0)); 412 ecore_animator_pos_map(pos, ECORE_POS_MAP_SINUSOIDAL, 0.0, 0.0));
413 413
414 if (pos == 1.0) 414 if (EINA_DBL_EQ(pos, 1.0))
415 { 415 {
416 anim_index = (anim_index == 1) ? 0 : 1; 416 anim_index = (anim_index == 1) ? 0 : 1;
417 animator = ecore_animator_timeline_add(1, _interpolation_keyframe, NULL); 417 animator = ecore_animator_timeline_add(1, _interpolation_keyframe, NULL);
diff --git a/src/examples/evas/evas-box.c b/src/examples/evas/evas-box.c
index 82d5483924..0a2156e5d2 100644
--- a/src/examples/evas/evas-box.c
+++ b/src/examples/evas/evas-box.c
@@ -150,13 +150,13 @@ list_free:
150 150
151 evas_object_box_align_get(d.box, &h, &v); 151 evas_object_box_align_get(d.box, &h, &v);
152 152
153 if (h == 0.5) 153 if (EINA_DBL_EQ(h, 0.5))
154 h = v = 1.0; 154 h = v = 1.0;
155 else if (h == 1.0) 155 else if (EINA_DBL_EQ(h, 1.0))
156 h = v = -1.0; 156 h = v = -1.0;
157 else if (h == -1.0) 157 else if (EINA_DBL_EQ(h, -1.0))
158 h = v = 0.0; 158 h = v = 0.0;
159 else if (h == 0.0) 159 else if (EINA_DBL_EQ(h, 0.0))
160 h = v = 0.5; 160 h = v = 0.5;
161 161
162 evas_object_box_align_set(d.box, h, v); 162 evas_object_box_align_set(d.box, h, v);
diff --git a/src/examples/evas/evas-gl.c b/src/examples/evas/evas-gl.c
index 3694d3c9bc..0d90665647 100644
--- a/src/examples/evas/evas-gl.c
+++ b/src/examples/evas/evas-gl.c
@@ -199,7 +199,7 @@ view_set_ortho(float result[16], const float left, const float right,
199 const float bottom, const float top, const float near_, 199 const float bottom, const float top, const float near_,
200 const float far_) 200 const float far_)
201{ 201{
202 if ((right - left) == 0.0f || (top - bottom) == 0.0f || (far_ - near_) == 0.0f) 202 if (EINA_FLT_EQ((right - left), 0.0f) || EINA_FLT_EQ((top - bottom), 0.0f) || EINA_FLT_EQ((far_ - near_), 0.0f))
203 return 0; 203 return 0;
204 204
205 result[0] = 2.0f / (right - left); 205 result[0] = 2.0f / (right - left);
diff --git a/src/examples/evas/evas-vg-batman.c b/src/examples/evas/evas-vg-batman.c
index 72bdd6c4fe..f6576f5d63 100644
--- a/src/examples/evas/evas-vg-batman.c
+++ b/src/examples/evas/evas-vg-batman.c
@@ -84,7 +84,7 @@ _animator(void *data EINA_UNUSED, double pos)
84 batmans_vg[next], 84 batmans_vg[next],
85 ecore_animator_pos_map(pos, ECORE_POS_MAP_SINUSOIDAL, 0.0, 0.0)); 85 ecore_animator_pos_map(pos, ECORE_POS_MAP_SINUSOIDAL, 0.0, 0.0));
86 86
87 if (pos == 1.0) 87 if (EINA_DBL_EQ(pos, 1.0))
88 { 88 {
89 animation_position = next; 89 animation_position = next;
90 animation = ecore_animator_timeline_add(1, _animator, NULL); 90 animation = ecore_animator_timeline_add(1, _animator, NULL);
diff --git a/src/examples/evas/evas-vg-simple.c b/src/examples/evas/evas-vg-simple.c
index ef128d511e..f5f284bf0a 100644
--- a/src/examples/evas/evas-vg-simple.c
+++ b/src/examples/evas/evas-vg-simple.c
@@ -451,7 +451,7 @@ _interpolation_keyframe(void *data EINA_UNUSED, double pos)
451 eina_list_nth(d.shape_list, next), 451 eina_list_nth(d.shape_list, next),
452 ecore_animator_pos_map(pos, ECORE_POS_MAP_SINUSOIDAL, 0.0, 0.0)); 452 ecore_animator_pos_map(pos, ECORE_POS_MAP_SINUSOIDAL, 0.0, 0.0));
453 453
454 if (pos == 1.0) 454 if (EINA_DBL_EQ(pos, 1.0))
455 { 455 {
456 anim_index = (anim_index == 1) ? 0 : 1; 456 anim_index = (anim_index == 1) ? 0 : 1;
457 animator = ecore_animator_timeline_add(1, _interpolation_keyframe, NULL); 457 animator = ecore_animator_timeline_add(1, _interpolation_keyframe, NULL);