Skip to content
Permalink
Browse files

Resolve gadcon-related float-equal warnings.

  • Loading branch information...
rbtylee committed May 28, 2018
1 parent 94e1804 commit b59375cf4ca489d0ece4115318bcc13781086989
Showing with 8 additions and 6 deletions.
  1. +2 −2 src/bin/e_gadcon.c
  2. +2 −2 src/bin/e_shelf.c
  3. +2 −1 src/modules/gadman/e_mod_gadman.c
  4. +2 −1 src/modules/gadman/e_mod_main.c
@@ -2926,12 +2926,12 @@ _e_gadcon_cb_dnd_enter(void *data, const char *type __UNUSED__, void *event)

w = gc->zone->w;
h = gc->zone->h;
if ((!gc->new_gcc->config.pos_x) && (!gc->new_gcc->config.pos_y))
if ((!EINA_DBL_NONZERO(gc->new_gcc->config.pos_x)) && (!EINA_DBL_NONZERO(gc->new_gcc->config.pos_y)))
{
gc->new_gcc->config.pos_x = (double)ev->x / (double)w;
gc->new_gcc->config.pos_y = (double)ev->y / (double)h;
}
if ((!gc->new_gcc->config.size_w) && (!gc->new_gcc->config.size_h))
if ((!EINA_DBL_NONZERO(gc->new_gcc->config.size_w)) && (!EINA_DBL_NONZERO(gc->new_gcc->config.size_h)))
{
evas_object_geometry_get(gcc->o_frame ?: gcc->o_base, NULL, NULL, &gw, &gh);
gc->new_gcc->config.size_w = (double)gw / (double)w;
@@ -1069,8 +1069,8 @@ e_shelf_config_new(E_Zone *zone, E_Config_Shelf *cf_es)
cf_es->popup, cf_es->layer, cf_es->id);
if (!es) return NULL;

if (!cf_es->hide_timeout) cf_es->hide_timeout = 1.0;
if (!cf_es->hide_duration) cf_es->hide_duration = 1.0;
if (!EINA_DBL_NONZERO(cf_es->hide_timeout)) cf_es->hide_timeout = 1.0;
if (!EINA_DBL_NONZERO(cf_es->hide_duration)) cf_es->hide_duration = 1.0;
es->cfg = cf_es;
es->fit_along = cf_es->fit_along;
es->fit_size = cf_es->fit_size;
@@ -925,7 +925,8 @@ _apply_widget_position(E_Gadcon_Client *gcc)
/* something broke the config's geom, make it visible so it can be
* resized/deleted
*/
if ((!gcc->cf->geom.pos_x) && (!gcc->cf->geom.pos_y) && (!gcc->cf->geom.size_w) && (!gcc->cf->geom.size_h))
if (!EINA_DBL_NONZERO(gcc->cf->geom.pos_x) && !EINA_DBL_NONZERO(gcc->cf->geom.pos_y)
&& !EINA_DBL_NONZERO(gcc->cf->geom.size_w) && !EINA_DBL_NONZERO(gcc->cf->geom.size_h))
{
gcc->cf->style = eina_stringshare_add(gcc->client_class->default_style ?: E_GADCON_CLIENT_STYLE_INSET);
gcc->style = eina_stringshare_ref(gcc->cf->style);
@@ -218,7 +218,8 @@ gadman_gadget_add_handler(void *d __UNUSED__, int type __UNUSED__, E_Event_Gadco
if (!Man->waiting) return ECORE_CALLBACK_RENEW;
l = eina_list_data_find_list(Man->waiting, ev->gcc->gadcon);
if (!l) return ECORE_CALLBACK_RENEW;
if (ev->gcc->cf->geom.pos_x || ev->gcc->cf->geom.pos_y || ev->gcc->cf->geom.size_w || ev->gcc->cf->geom.size_h)
if (EINA_DBL_NONZERO(ev->gcc->cf->geom.pos_x) || EINA_DBL_NONZERO(ev->gcc->cf->geom.pos_y) ||
EINA_DBL_NONZERO(ev->gcc->cf->geom.size_w) || EINA_DBL_NONZERO(ev->gcc->cf->geom.size_h))
return ECORE_CALLBACK_RENEW;
ev->gcc->cf->style = eina_stringshare_add(ev->gcc->client_class->default_style ?: E_GADCON_CLIENT_STYLE_INSET);
ev->gcc->style = eina_stringshare_ref(ev->gcc->cf->style);

1 comment on commit b59375c

@rbtylee

This comment has been minimized.

Copy link
Collaborator Author

commented on b59375c May 28, 2018

This is a backport.

Please sign in to comment.
You can’t perform that action at this time.