From: Matthew Fernandez Date: Sat, 24 Dec 2022 21:46:58 +0000 (-0800) Subject: smyrna appmouse_up: remove no-op branches X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=de9246502cdf2a58a358bba49e2b2d1e3fc963c6;p=graphviz smyrna appmouse_up: remove no-op branches --- diff --git a/cmd/smyrna/gui/appmouse.c b/cmd/smyrna/gui/appmouse.c index 09020eb9a..9facb4f3e 100644 --- a/cmd/smyrna/gui/appmouse.c +++ b/cmd/smyrna/gui/appmouse.c @@ -70,11 +70,6 @@ static void apply_actions(ViewInfo* v,int x,int y) lastAction=a; } -static int singleclick(ViewInfo* v) -{ - return(((int)v->mouse.initPos.x == (int)v->mouse.finalPos.x) && ((int)v->mouse.initPos.y == (int)v->mouse.finalPos.y)); - -} static void appmouse_down(ViewInfo* v,int x,int y) { view->mouse.dragX = 0; @@ -94,15 +89,6 @@ static void appmouse_up(ViewInfo* v,int x,int y) v->mouse.finalPos.x=x; v->mouse.finalPos.y=y; to3D(x,y, &v->mouse.GLfinalPos.x,&v->mouse.GLfinalPos.y,&v->mouse.GLfinalPos.z); - if(singleclick(v)) - { - if (v->mouse.t==glMouseLeftButton) { - // no-op - } - if (v->mouse.t==glMouseRightButton) { - // no-op - } - } apply_actions(v,x,y); view->mouse.dragX = 0; view->mouse.dragY = 0;