Skip to content

Commit c112768

Browse files
committed
removed goto
1 parent 47e86e3 commit c112768

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src_c/rect.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,13 +1113,10 @@ pg_rect_clip(pgRectObject *self, PyObject *args)
11131113
h = MIN(A->y + A->h, B->y + B->h) - y;
11141114

11151115
if (w < 0 || h < 0) {
1116-
goto nointersect;
1116+
return _pg_rect_subtype_new4(Py_TYPE(self), A->x, A->y, 0, 0);
11171117
}
11181118

11191119
return _pg_rect_subtype_new4(Py_TYPE(self), x, y, w, h);
1120-
1121-
nointersect:
1122-
return _pg_rect_subtype_new4(Py_TYPE(self), A->x, A->y, 0, 0);
11231120
}
11241121

11251122
/* clipline() - crops the given line within the rect

0 commit comments

Comments
 (0)