mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
minor optimization of boolean comparisons
This commit is contained in:
parent
e960c29acb
commit
ff7466df6e
2 changed files with 28 additions and 4 deletions
|
@ -245,6 +245,12 @@ StmtPtr IfStmt::DoReduce(Reducer* c) {
|
|||
red_e_stmt = cond_red_stmt;
|
||||
}
|
||||
|
||||
// Check again for negation given above reductions/replacements.
|
||||
if ( e->Tag() == EXPR_NOT ) {
|
||||
std::swap(s1, s2);
|
||||
e = e->GetOp1();
|
||||
}
|
||||
|
||||
StmtPtr sl;
|
||||
|
||||
if ( e->IsConst() ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue