Skip to content

Commit 5a0c488

Browse files
committed
guardt::operator-=: use member function instead of friend
1 parent db496e8 commit 5a0c488

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/util/guard.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,10 @@ void guardt::add(const exprt &expr)
9494
op.push_back(expr);
9595
}
9696

97-
guardt &operator -= (guardt &g1, const guardt &g2)
97+
guardt& guardt::operator -= (const guardt &g2)
9898
{
99+
guardt &g1=*this;
100+
99101
if(g1.id()!=ID_and || g2.id()!=ID_and)
100102
return g1;
101103

src/util/guard.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class guardt:public exprt
6262
void make_false();
6363
#endif
6464

65-
friend guardt &operator -= (guardt &g1, const guardt &g2);
65+
guardt& operator -= (const guardt &g2);
6666
guardt& logical_or(const guardt &g2, const namespacet &ns);
6767

6868
#if 0

0 commit comments

Comments
 (0)