Skip to content

Commit 740d25c

Browse files
committed
merge bitcoin#24406: Fix Wambiguous-reversed-operator compiler warnings
1 parent 3265b54 commit 740d25c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/test/fuzz/addrman.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ class CAddrManDeterministic : public CAddrMan
142142
* - vvNew entries refer to the same addresses
143143
* - vvTried entries refer to the same addresses
144144
*/
145-
bool operator==(const CAddrManDeterministic& other)
145+
bool operator==(const CAddrManDeterministic& other) const
146146
{
147147
LOCK2(cs, other.cs);
148148

src/test/serialize_tests.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ class CSerializeMethodsTestSingle
3838
READWRITE(obj.txval);
3939
}
4040

41-
bool operator==(const CSerializeMethodsTestSingle& rhs)
41+
bool operator==(const CSerializeMethodsTestSingle& rhs) const
4242
{
43-
return intval == rhs.intval && \
44-
boolval == rhs.boolval && \
45-
stringval == rhs.stringval && \
46-
strcmp(charstrval, rhs.charstrval) == 0 && \
47-
*txval == *rhs.txval;
43+
return intval == rhs.intval &&
44+
boolval == rhs.boolval &&
45+
stringval == rhs.stringval &&
46+
strcmp(charstrval, rhs.charstrval) == 0 &&
47+
*txval == *rhs.txval;
4848
}
4949
};
5050

0 commit comments

Comments
 (0)