aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2022-02-21 16:45:50 +0100
committerMarcoFalke <falke.marco@gmail.com>2022-02-21 16:36:59 +0100
commitfafc4eb3637be0a85644c89c355fe68678a62c17 (patch)
tree0ee5b1151cb6bf20fad410244c6ab7c273dd24e2 /src/test
parente44423c9d364eba9199b7097eeb20b0dfa91284e (diff)
test: Fix Wambiguous-reversed-operator compiler warnings
Diffstat (limited to 'src/test')
-rw-r--r--src/test/fuzz/addrman.cpp2
-rw-r--r--src/test/serialize_tests.cpp12
2 files changed, 7 insertions, 7 deletions
diff --git a/src/test/fuzz/addrman.cpp b/src/test/fuzz/addrman.cpp
index 3699abb597..ba917dec2a 100644
--- a/src/test/fuzz/addrman.cpp
+++ b/src/test/fuzz/addrman.cpp
@@ -137,7 +137,7 @@ public:
* - vvNew entries refer to the same addresses
* - vvTried entries refer to the same addresses
*/
- bool operator==(const AddrManDeterministic& other)
+ bool operator==(const AddrManDeterministic& other) const
{
LOCK2(m_impl->cs, other.m_impl->cs);
diff --git a/src/test/serialize_tests.cpp b/src/test/serialize_tests.cpp
index 2441847f99..8c7c650cb1 100644
--- a/src/test/serialize_tests.cpp
+++ b/src/test/serialize_tests.cpp
@@ -38,13 +38,13 @@ public:
READWRITE(obj.txval);
}
- bool operator==(const CSerializeMethodsTestSingle& rhs)
+ bool operator==(const CSerializeMethodsTestSingle& rhs) const
{
- return intval == rhs.intval && \
- boolval == rhs.boolval && \
- stringval == rhs.stringval && \
- strcmp(charstrval, rhs.charstrval) == 0 && \
- *txval == *rhs.txval;
+ return intval == rhs.intval &&
+ boolval == rhs.boolval &&
+ stringval == rhs.stringval &&
+ strcmp(charstrval, rhs.charstrval) == 0 &&
+ *txval == *rhs.txval;
}
};