mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-30 08:00:51 +00:00
Remove useless conditional branches too.
"if x" jumping to the next statement is pretty useless.
This commit is contained in:
parent
92fffb3c7e
commit
07187cae7c
1 changed files with 2 additions and 1 deletions
|
@ -1427,7 +1427,8 @@ thread_jumps (sblock_t *blocks)
|
||||||
l->used++;
|
l->used++;
|
||||||
*label = l;
|
*label = l;
|
||||||
}
|
}
|
||||||
if (statement_is_goto (s) && (*label)->dest == sblock->next) {
|
if ((statement_is_goto (s) || statement_is_cond (s))
|
||||||
|
&& (*label)->dest == sblock->next) {
|
||||||
statement_t **p;
|
statement_t **p;
|
||||||
unuse_label (*label);
|
unuse_label (*label);
|
||||||
for (p = &sblock->statements; *p != s; p = &(*p)->next)
|
for (p = &sblock->statements; *p != s; p = &(*p)->next)
|
||||||
|
|
Loading…
Reference in a new issue