mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Fix clang-tidy bugprone-suspicious-memory-comparison warnings in headers
This commit is contained in:
parent
bdd1909c61
commit
9a3401deee
1 changed files with 4 additions and 0 deletions
|
@ -38,12 +38,16 @@ public:
|
||||||
ConnKey(const ConnKey& rhs) { *this = rhs; }
|
ConnKey(const ConnKey& rhs) { *this = rhs; }
|
||||||
ConnKey(Val* v);
|
ConnKey(Val* v);
|
||||||
|
|
||||||
|
// FIXME: This is getting reworked as part of the connection tuple changes. Suppress
|
||||||
|
// the clang-tidy warning for the time being.
|
||||||
|
// NOLINTBEGIN(bugprone-suspicious-memory-comparison)
|
||||||
bool operator<(const ConnKey& rhs) const { return memcmp(this, &rhs, sizeof(ConnKey)) < 0; }
|
bool operator<(const ConnKey& rhs) const { return memcmp(this, &rhs, sizeof(ConnKey)) < 0; }
|
||||||
bool operator<=(const ConnKey& rhs) const { return memcmp(this, &rhs, sizeof(ConnKey)) <= 0; }
|
bool operator<=(const ConnKey& rhs) const { return memcmp(this, &rhs, sizeof(ConnKey)) <= 0; }
|
||||||
bool operator==(const ConnKey& rhs) const { return memcmp(this, &rhs, sizeof(ConnKey)) == 0; }
|
bool operator==(const ConnKey& rhs) const { return memcmp(this, &rhs, sizeof(ConnKey)) == 0; }
|
||||||
bool operator!=(const ConnKey& rhs) const { return memcmp(this, &rhs, sizeof(ConnKey)) != 0; }
|
bool operator!=(const ConnKey& rhs) const { return memcmp(this, &rhs, sizeof(ConnKey)) != 0; }
|
||||||
bool operator>=(const ConnKey& rhs) const { return memcmp(this, &rhs, sizeof(ConnKey)) >= 0; }
|
bool operator>=(const ConnKey& rhs) const { return memcmp(this, &rhs, sizeof(ConnKey)) >= 0; }
|
||||||
bool operator>(const ConnKey& rhs) const { return memcmp(this, &rhs, sizeof(ConnKey)) > 0; }
|
bool operator>(const ConnKey& rhs) const { return memcmp(this, &rhs, sizeof(ConnKey)) > 0; }
|
||||||
|
// NOLINTEND(bugprone-suspicious-memory-comparison)
|
||||||
|
|
||||||
ConnKey& operator=(const ConnKey& rhs);
|
ConnKey& operator=(const ConnKey& rhs);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue