diff --git a/src/test/fuzz/addrman.cpp b/src/test/fuzz/addrman.cpp index d819444b1b2f6d..9479e5161e8580 100644 --- a/src/test/fuzz/addrman.cpp +++ b/src/test/fuzz/addrman.cpp @@ -142,7 +142,7 @@ class CAddrManDeterministic : public CAddrMan * - vvNew entries refer to the same addresses * - vvTried entries refer to the same addresses */ - bool operator==(const CAddrManDeterministic& other) + bool operator==(const CAddrManDeterministic& other) const { LOCK2(cs, other.cs); diff --git a/src/test/serialize_tests.cpp b/src/test/serialize_tests.cpp index a91fa9297e2596..f430cd96e5e554 100644 --- a/src/test/serialize_tests.cpp +++ b/src/test/serialize_tests.cpp @@ -38,13 +38,13 @@ class CSerializeMethodsTestSingle 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; } };