resolve binding+action float-equal warnings

Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
This commit is contained in:
Mike Blumenkrantz 2017-01-06 12:56:22 -05:00
parent 0bbdd76469
commit 7264ac9e96
2 changed files with 7 additions and 11 deletions

View File

@ -1882,18 +1882,14 @@ ACT_FN_GO(exec, )
{
E_Zone *zone;
static double lock;
double test;
/* prevent exec actions from occurring too frequently */
if (lock)
test = ecore_loop_time_get();
if (test - lock < 0.05)
{
double test;
test = ecore_loop_time_get();
if (test - lock < 0.05)
{
lock = test;
return;
}
lock = test;
return;
}
lock = ecore_loop_time_get();
zone = _e_actions_zone_get(obj);

View File

@ -831,7 +831,7 @@ e_bindings_edge_del(E_Binding_Context ctxt, E_Zone_Edge edge, Eina_Bool drag_onl
{
if ((binding->ctxt == ctxt) &&
(binding->mod == mod) &&
((binding->delay * 1000) == (delay * 1000)) &&
EINA_FLT_CMP(binding->delay, delay) &&
(binding->any_mod == any_mod) &&
(binding->drag_only == drag_only) &&
(((binding->action) && (action) && (!strcmp(binding->action, action))) ||
@ -862,7 +862,7 @@ e_bindings_edge_event_find(E_Binding_Context ctxt, E_Event_Zone_Edge *ev, Eina_B
EINA_LIST_FOREACH(edge_bindings, l, binding)
/* A value of <= -1.0 for the delay indicates it as a mouse-click binding on that edge */
if (((binding->edge == ev->edge)) &&
((click && (binding->delay == -1.0 * click)) || (!click && (binding->delay >= 0.0))) &&
((click && EINA_FLT_CMP(binding->delay, -1.0 * click)) || (!click && (binding->delay >= 0.0))) &&
((binding->drag_only == ev->drag) || ev->drag) &&
((binding->any_mod) || (binding->mod == mod)))
{