From 3a2fe3ae58d223c8ac18c97e8ae0d6e6d4eb48b7 Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Mon, 21 Feb 2022 16:45:50 +0100 Subject: [PATCH] merge bitcoin#24406: Fix Wambiguous-reversed-operator compiler warnings --- src/test/fuzz/addrman.cpp | 2 +- src/test/serialize_tests.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) 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; } };