Skip to content

Commit fafc4eb

Browse files
author
MarcoFalke
committed
test: Fix Wambiguous-reversed-operator compiler warnings
1 parent e44423c commit fafc4eb

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/test/fuzz/addrman.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ class AddrManDeterministic : public AddrMan
137137
* - vvNew entries refer to the same addresses
138138
* - vvTried entries refer to the same addresses
139139
*/
140-
bool operator==(const AddrManDeterministic& other)
140+
bool operator==(const AddrManDeterministic& other) const
141141
{
142142
LOCK2(m_impl->cs, other.m_impl->cs);
143143

src/test/serialize_tests.cpp

+6-6
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)