Skip to content

Commit

Permalink
merge bitcoin#24406: Fix Wambiguous-reversed-operator compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kwvg committed Apr 18, 2024
1 parent a76d7d6 commit bc817f1
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 @@ -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);

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 bc817f1

Please sign in to comment.