edje: fix float comparison warning in edje SVG loader.
authorCedric BAIL <cedric@osg.samsung.com>
Tue, 20 Dec 2016 23:47:06 +0000 (15:47 -0800)
committerCedric BAIL <cedric@osg.samsung.com>
Wed, 21 Dec 2016 00:39:30 +0000 (16:39 -0800)
src/bin/edje/edje_svg_loader.c

index c9b4165..0d8c5e5 100644 (file)
@@ -1233,8 +1233,8 @@ _attr_parse_rect_node(void *data, const char *key, const char *value)
         _parse_style_attr(node, key, value);
      }
 
-   if (rect->rx != 0 && rect->ry == 0) rect->ry = rect->rx;
-   if (rect->ry != 0 && rect->rx == 0) rect->rx = rect->ry;
+   if (!EINA_DBL_CMP(rect->rx, 0) && EINA_DBL_CMP(rect->ry, 0)) rect->ry = rect->rx;
+   if (!EINA_DBL_CMP(rect->ry, 0) && EINA_DBL_CMP(rect->rx, 0)) rect->rx = rect->ry;
 
    return EINA_TRUE;
 }