mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-21 20:54:47 +03:00
Linked if blocks into if-else blocks
This commit is contained in:
parent
186145e5a0
commit
db68ec3a24
|
@ -1004,9 +1004,7 @@ clip_tree_do_clip(
|
||||||
end->type = -1;
|
end->type = -1;
|
||||||
end->next = NULL;
|
end->next = NULL;
|
||||||
*ret = start;
|
*ret = start;
|
||||||
return 0;
|
} else if (root->type == CT_CLIP) {
|
||||||
}
|
|
||||||
if (root->type == CT_CLIP) {
|
|
||||||
double eps = 1e-9;
|
double eps = 1e-9;
|
||||||
double A = root->a;
|
double A = root->a;
|
||||||
double B = root->b;
|
double B = root->b;
|
||||||
|
@ -1048,9 +1046,7 @@ clip_tree_do_clip(
|
||||||
} else {
|
} else {
|
||||||
*ret = NULL;
|
*ret = NULL;
|
||||||
}
|
}
|
||||||
return 0;
|
} else if (root->type == CT_OR || root->type == CT_AND) {
|
||||||
}
|
|
||||||
if (root->type == CT_OR || root->type == CT_AND) {
|
|
||||||
event_list *l1;
|
event_list *l1;
|
||||||
event_list *l2;
|
event_list *l2;
|
||||||
if (clip_tree_do_clip(root->l, x0, y, x1, &l1) < 0) {
|
if (clip_tree_do_clip(root->l, x0, y, x1, &l1) < 0) {
|
||||||
|
@ -1102,9 +1098,9 @@ clip_tree_do_clip(
|
||||||
free(t);
|
free(t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
} else {
|
||||||
}
|
|
||||||
*ret = NULL;
|
*ret = NULL;
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1127,8 +1123,7 @@ void
|
||||||
debug_clip_tree(clip_node *root, int space) {
|
debug_clip_tree(clip_node *root, int space) {
|
||||||
if (root == NULL) {
|
if (root == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
} else if (root->type == CT_CLIP) {
|
||||||
if (root->type == CT_CLIP) {
|
|
||||||
int t = space;
|
int t = space;
|
||||||
while (t--) {
|
while (t--) {
|
||||||
fputc(' ', stderr);
|
fputc(' ', stderr);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user