mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Fix clang-tidy bugprone-unhandled-self-assignment warnings in headers
This commit is contained in:
parent
9a3401deee
commit
a58110986d
2 changed files with 5 additions and 0 deletions
|
@ -104,6 +104,8 @@ public:
|
|||
return *this;
|
||||
}
|
||||
const EventHandlerPtr& operator=(const EventHandlerPtr& h) {
|
||||
if ( this == &h )
|
||||
return *this;
|
||||
handler = h.handler;
|
||||
return *this;
|
||||
}
|
||||
|
|
|
@ -85,6 +85,9 @@ inline UID::UID(const UID& other) {
|
|||
}
|
||||
|
||||
inline UID& UID::operator=(const UID& other) {
|
||||
if ( this == &other )
|
||||
return *this;
|
||||
|
||||
memmove(uid, other.uid, sizeof(uid));
|
||||
initialized = other.initialized;
|
||||
return *this;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue