devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2faf3df444bbe10c1628beff475028d00769c0ea

commit 2faf3df444bbe10c1628beff475028d00769c0ea
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Tue Dec 20 11:13:40 2016 -0500

    emotion: remove float comparison warnings
    
    Signed-off-by: Chris Michael <cp.mich...@samsung.com>
---
 src/lib/emotion/emotion_smart.c               | 13 +++++++------
 src/modules/emotion/gstreamer1/emotion_sink.c |  2 +-
 src/modules/emotion/xine/emotion_xine.c       |  4 ++--
 3 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/lib/emotion/emotion_smart.c b/src/lib/emotion/emotion_smart.c
index 5ea48bb..8add1227e 100644
--- a/src/lib/emotion/emotion_smart.c
+++ b/src/lib/emotion/emotion_smart.c
@@ -1540,8 +1540,8 @@ _emotion_video_pos_update(Evas_Object *obj, double pos, 
double len)
    int npos = 0, nlen = 0;
 
    E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
-   if (pos != sd->pos) npos = 1;
-   if (len != sd->len) nlen = 1;
+   if (!EINA_DBL_CMP(pos, sd->pos)) npos = 1;
+   if (!EINA_DBL_CMP(len, sd->len)) nlen = 1;
    sd->pos = pos;
    sd->len = len;
    if (npos)
@@ -1573,8 +1573,8 @@ _emotion_frame_resize(Evas_Object *obj, int w, int h, 
double ratio)
      }
    if (h > 0) tmp  = (double)w / (double)h;
    else tmp = 1.0;
-   if (ratio != tmp) tmp = ratio;
-   if (tmp != sd->ratio)
+   if (!EINA_DBL_CMP(ratio, tmp)) tmp = ratio;
+   if (!EINA_DBL_CMP(tmp, sd->ratio))
      {
         sd->ratio = tmp;
         changed = 1;
@@ -1619,7 +1619,7 @@ _emotion_open_done(Evas_Object *obj)
    E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
    sd->open = 1;
 
-   if (sd->remember_jump)
+   if (!EINA_DBL_CMP(sd->remember_jump, 0.0))
      emotion_object_position_set(obj, sd->remember_jump);
    if (sd->remember_play != sd->play)
      emotion_object_play_set(obj, sd->remember_play);
@@ -1737,7 +1737,8 @@ _emotion_frame_refill(Evas_Object *obj, double w, double 
h)
    Efl_Canvas_Video_Data *sd;
 
    E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
-   if ((sd->fill.w != w) || (sd->fill.h != h))
+   if ((!EINA_DBL_CMP(sd->fill.w, w)) ||
+       (!EINA_DBL_CMP(sd->fill.h, h)))
      {
         Evas_Coord ow, oh;
 
diff --git a/src/modules/emotion/gstreamer1/emotion_sink.c 
b/src/modules/emotion/gstreamer1/emotion_sink.c
index f897d37..c31f365 100644
--- a/src/modules/emotion/gstreamer1/emotion_sink.c
+++ b/src/modules/emotion/gstreamer1/emotion_sink.c
@@ -345,7 +345,7 @@ _update_emotion_fps(EmotionVideoSinkPrivate *priv)
    tim = ecore_time_get();
    priv->frames++;
 
-   if (priv->rlapse == 0.0)
+   if (EINA_DBL_CMP(priv->rlapse, 0.0))
      {
         priv->rlapse = tim;
         priv->flapse = priv->frames;
diff --git a/src/modules/emotion/xine/emotion_xine.c 
b/src/modules/emotion/xine/emotion_xine.c
index 4a9ac91..d7bf569 100644
--- a/src/modules/emotion/xine/emotion_xine.c
+++ b/src/modules/emotion/xine/emotion_xine.c
@@ -196,7 +196,7 @@ _em_slave(void *par)
                       
                       pos = *((double *)eev->xine_event);
                       if ((xine_get_param(ev->stream, XINE_PARAM_SPEED) == 
XINE_SPEED_PAUSE) &&
-                          (pos == ev->pos) &&
+                          (EINA_DBL_CMP(pos, ev->pos)) &&
                           (!ev->just_loaded))
                         {
                            xine_set_param(ev->stream, XINE_PARAM_SPEED, 
XINE_SPEED_NORMAL);
@@ -1324,7 +1324,7 @@ _em_fd_ev_active(void *data EINA_UNUSED, Ecore_Fd_Handler 
*fdh)
                       ev->play_ok = 1;
                       break;
                      case 15: /* get pos done */
-                       if (ev->last_pos != ev->pos)
+                       if (!EINA_DBL_CMP(ev->last_pos, ev->pos))
                          {
                             ev->last_pos = ev->pos;
                             _emotion_video_pos_update(ev->obj, ev->pos, 
ev->len);

-- 


Reply via email to