File tree 1 file changed +2
-6
lines changed 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -69,9 +69,7 @@ guard_exprt &operator-=(guard_exprt &g1, const guard_exprt &g2)
69
69
if (g1.expr .id () != ID_and || g2.expr .id () != ID_and)
70
70
return g1;
71
71
72
- sort_and_join (g1.expr );
73
72
exprt g2_sorted = g2.as_expr ();
74
- sort_and_join (g2_sorted);
75
73
76
74
exprt::operandst &op1 = g1.expr .operands ();
77
75
const exprt::operandst &op2 = g2_sorted.operands ();
@@ -80,10 +78,10 @@ guard_exprt &operator-=(guard_exprt &g1, const guard_exprt &g2)
80
78
for (exprt::operandst::const_iterator it2 = op2.begin (); it2 != op2.end ();
81
79
++it2)
82
80
{
83
- while (it1 != op1.end () && *it1 < *it2)
84
- ++it1;
85
81
if (it1 != op1.end () && *it1 == *it2)
86
82
it1 = op1.erase (it1);
83
+ else
84
+ break ;
87
85
}
88
86
89
87
g1.expr = conjunction (op1);
@@ -116,9 +114,7 @@ guard_exprt &operator|=(guard_exprt &g1, const guard_exprt &g2)
116
114
}
117
115
118
116
// find common prefix
119
- sort_and_join (g1.expr );
120
117
exprt g2_sorted = g2.as_expr ();
121
- sort_and_join (g2_sorted);
122
118
123
119
exprt::operandst &op1 = g1.expr .operands ();
124
120
const exprt::operandst &op2 = g2_sorted.operands ();
You can’t perform that action at this time.
0 commit comments