mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-28 01:12:30 +01:00
WINGs: removed unnecessary gotos in handleTextKeyPress
When the condition can be simply checked in an if, it is better to do that than to use a flow breaking goto. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
3a191af838
commit
ca9dd144ae
@@ -2231,11 +2231,8 @@ static void handleTextKeyPress(Text * tPtr, XEvent * event)
|
|||||||
case XK_Left:
|
case XK_Left:
|
||||||
if (!(tb = tPtr->currentTextBlock))
|
if (!(tb = tPtr->currentTextBlock))
|
||||||
break;
|
break;
|
||||||
if (tb->graphic)
|
|
||||||
goto L_imaGFX;
|
|
||||||
|
|
||||||
if (tPtr->tpos == 0) {
|
if (tb->graphic || tPtr->tpos == 0) {
|
||||||
L_imaGFX:
|
|
||||||
if (tb->prior) {
|
if (tb->prior) {
|
||||||
tPtr->currentTextBlock = tb->prior;
|
tPtr->currentTextBlock = tb->prior;
|
||||||
if (tPtr->currentTextBlock->graphic)
|
if (tPtr->currentTextBlock->graphic)
|
||||||
@@ -2256,10 +2253,7 @@ static void handleTextKeyPress(Text * tPtr, XEvent * event)
|
|||||||
case XK_Right:
|
case XK_Right:
|
||||||
if (!(tb = tPtr->currentTextBlock))
|
if (!(tb = tPtr->currentTextBlock))
|
||||||
break;
|
break;
|
||||||
if (tb->graphic)
|
if (tb->graphic || tPtr->tpos == tb->used) {
|
||||||
goto R_imaGFX;
|
|
||||||
if (tPtr->tpos == tb->used) {
|
|
||||||
R_imaGFX:
|
|
||||||
if (tb->next) {
|
if (tb->next) {
|
||||||
tPtr->currentTextBlock = tb->next;
|
tPtr->currentTextBlock = tb->next;
|
||||||
tPtr->tpos = 0;
|
tPtr->tpos = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user