Skip to content

Commit

Permalink
test: Fix Wambiguous-reversed-operator compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoFalke committed Feb 21, 2022
1 parent e44423c commit fafc4eb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/test/fuzz/addrman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
12 changes: 6 additions & 6 deletions src/test/serialize_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
};

Expand Down

0 comments on commit fafc4eb

Please sign in to comment.