From fafc4eb3637be0a85644c89c355fe68678a62c17 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Mon, 21 Feb 2022 16:45:50 +0100 Subject: [PATCH] test: 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 3699abb597704..ba917dec2a1fc 100644 --- a/src/test/fuzz/addrman.cpp +++ b/src/test/fuzz/addrman.cpp @@ -137,7 +137,7 @@ class AddrManDeterministic : public AddrMan * - 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 2441847f99313..8c7c650cb1656 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; } };