forked from enlightenment/enlightenment
e - fix float warnings cmp where they actually may cause issues
This commit is contained in:
parent
a5faab4fa1
commit
03d0f1d2dc
|
@ -809,7 +809,7 @@ e_bindings_edge_get(const char *action, E_Zone_Edge edge, int click)
|
|||
EINA_LIST_FOREACH(edge_bindings, l, binding)
|
||||
{
|
||||
if ((binding->edge == edge) &&
|
||||
((click && (binding->delay == -1.0 * click))
|
||||
((click && EINA_DBL_CMP(binding->delay, -1.0 * click))
|
||||
|| (!click && (binding->delay >= 0.0))) &&
|
||||
(binding->action) && (action) &&
|
||||
(!strcmp(action, binding->action)))
|
||||
|
|
|
@ -378,7 +378,7 @@ _basic_screen_info_fill(E_Config_Dialog_Data *cfdata, E_Config_Randr2_Screen *cs
|
|||
cfdata->freelist = eina_list_append(cfdata->freelist, mode_cbdata);
|
||||
/* printf("mode add %p %p %p\n", mode_cbdata, cfdata->modes_obj, it); */
|
||||
if ((cs->mode_w == m->w) && (cs->mode_h == m->h) &&
|
||||
(cs->mode_refresh == m->refresh))
|
||||
(fabs(cs->mode_refresh - m->refresh) < 0.01 ))
|
||||
it_sel = it;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,21 +80,21 @@ popup_update(Instance *inst)
|
|||
snprintf(buf, sizeof(buf), _("Longitude: %f"), inst->longitude);
|
||||
e_widget_label_text_set(inst->popup_longitude, buf);
|
||||
|
||||
if (inst->altitude != -DBL_MAX)
|
||||
if (inst->altitude <= -DBL_MAX)
|
||||
snprintf(buf, sizeof(buf), _("Altitude: %f"), inst->altitude);
|
||||
else
|
||||
snprintf(buf, sizeof(buf), _("Altitude: N/A"));
|
||||
|
||||
e_widget_label_text_set(inst->popup_altitude, buf);
|
||||
|
||||
if (inst->speed != -1.0)
|
||||
if (inst->speed <= -1.0)
|
||||
snprintf(buf, sizeof(buf), _("Speed: %f"), inst->speed);
|
||||
else
|
||||
snprintf(buf, sizeof(buf), _("Speed: N/A"));
|
||||
|
||||
e_widget_label_text_set(inst->popup_speed, buf);
|
||||
|
||||
if (inst->heading != -1.0)
|
||||
if (inst->heading <= -1.0)
|
||||
snprintf(buf, sizeof(buf), _("Heading: %f"), inst->heading);
|
||||
else
|
||||
snprintf(buf, sizeof(buf), _("Heading: N/A"));
|
||||
|
@ -146,7 +146,7 @@ popup_new(Instance *inst)
|
|||
inst->popup_longitude = e_widget_label_add(evas, buf);
|
||||
e_widget_list_object_append(list, inst->popup_longitude, 1, 1, 0.5);
|
||||
|
||||
if (inst->altitude != -DBL_MAX)
|
||||
if (inst->altitude <= -DBL_MAX)
|
||||
snprintf(buf, sizeof(buf), _("Altitude: %f"), inst->altitude);
|
||||
else
|
||||
snprintf(buf, sizeof(buf), _("Altitude: N/A"));
|
||||
|
@ -154,7 +154,7 @@ popup_new(Instance *inst)
|
|||
inst->popup_altitude = e_widget_label_add(evas, buf);
|
||||
e_widget_list_object_append(list, inst->popup_altitude, 1, 1, 0.5);
|
||||
|
||||
if (inst->speed != -1.0)
|
||||
if (inst->speed <= -1.0)
|
||||
snprintf(buf, sizeof(buf), _("Speed: %f"), inst->speed);
|
||||
else
|
||||
snprintf(buf, sizeof(buf), _("Speed: N/A"));
|
||||
|
@ -162,7 +162,7 @@ popup_new(Instance *inst)
|
|||
inst->popup_speed = e_widget_label_add(evas, buf);
|
||||
e_widget_list_object_append(list, inst->popup_speed, 1, 1, 0.5);
|
||||
|
||||
if (inst->heading != -1.0)
|
||||
if (inst->heading <= -1.0)
|
||||
snprintf(buf, sizeof(buf), _("Heading: %f"), inst->heading);
|
||||
else
|
||||
snprintf(buf, sizeof(buf), _("Heading: N/A"));
|
||||
|
|
|
@ -997,7 +997,7 @@ _move_or_resize(E_Client *ec)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
if ((w_diff != 1.0) || (h_diff != 1.0))
|
||||
if ((!EINA_DBL_CMP(w_diff, 1.0)) || (!EINA_DBL_CMP(h_diff, 1.0)))
|
||||
{
|
||||
if (!tiling_window_tree_node_resize(item, w_dir, w_diff, h_dir,
|
||||
h_diff))
|
||||
|
|
|
@ -457,7 +457,7 @@ tiling_window_tree_node_resize(Window_Tree *node, int w_dir, double w_diff,
|
|||
h_parent = parent;
|
||||
}
|
||||
|
||||
if ((h_diff != 1.0) && h_parent)
|
||||
if ((!EINA_DBL_CMP(h_diff, 1.0)) && h_parent)
|
||||
{
|
||||
Window_Tree *tmp_node = (h_parent == parent) ? node : parent;
|
||||
|
||||
|
@ -466,7 +466,7 @@ tiling_window_tree_node_resize(Window_Tree *node, int w_dir, double w_diff,
|
|||
h_diff, h_dir);
|
||||
}
|
||||
|
||||
if ((w_diff != 1.0) && w_parent)
|
||||
if ((!EINA_DBL_CMP(w_diff, 1.0)) && w_parent)
|
||||
{
|
||||
Window_Tree *tmp_node = (w_parent == parent) ? node : parent;
|
||||
|
||||
|
|
Loading…
Reference in New Issue