Skip to content

Commit

Permalink
Simplify inequality function of configuration (#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
ehds authored May 19, 2021
1 parent ae3e711 commit 154d805
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/braft/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ inline bool operator==(const PeerId& id1, const PeerId& id2) {
}

inline bool operator!=(const PeerId& id1, const PeerId& id2) {
return (id1.addr != id2.addr || id1.idx != id2.idx);
return !(id1 == id2);
}

inline std::ostream& operator << (std::ostream& os, const PeerId& id) {
Expand Down

0 comments on commit 154d805

Please sign in to comment.