Skip to content

Commit fbd21bb

Browse files
author
Joel Allred
committed
Call binary_relation_exprt directly
Type-check is redundant for these functions.
1 parent 9c80352 commit fbd21bb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/util/string_expr.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ inline binary_relation_exprt greater_than(const exprt &lhs, const exprt &rhs)
3131

3232
inline binary_relation_exprt greater_than(const exprt &lhs, mp_integer i)
3333
{
34-
return greater_than(lhs, from_integer(i, lhs.type()));
34+
return binary_relation_exprt(from_integer(i, lhs.type()), ID_lt, lhs);
3535
}
3636

3737
inline binary_relation_exprt
@@ -44,7 +44,7 @@ less_than_or_equal_to(const exprt &lhs, const exprt &rhs)
4444
inline binary_relation_exprt
4545
less_than_or_equal_to(const exprt &lhs, mp_integer i)
4646
{
47-
return less_than_or_equal_to(lhs, from_integer(i, lhs.type()));
47+
return binary_relation_exprt(lhs, ID_le, from_integer(i, lhs.type()));
4848
}
4949

5050
inline equal_exprt equal_to(const exprt &lhs, const exprt &rhs)
@@ -55,7 +55,7 @@ inline equal_exprt equal_to(const exprt &lhs, const exprt &rhs)
5555

5656
inline equal_exprt equal_to(const exprt &lhs, mp_integer i)
5757
{
58-
return equal_to(lhs, from_integer(i, lhs.type()));
58+
return equal_exprt(lhs, from_integer(i, lhs.type()));
5959
}
6060

6161
// Representation of strings as arrays

0 commit comments

Comments
 (0)