mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Merge remote-tracking branch 'origin/topic/neverlord/coverity'
* origin/topic/neverlord/coverity: Improve assignment operators for IntrusivePtr
This commit is contained in:
commit
ba0a4fe9cf
3 changed files with 26 additions and 2 deletions
7
CHANGES
7
CHANGES
|
@ -1,3 +1,10 @@
|
||||||
|
|
||||||
|
4.1.0-dev.708 | 2021-06-07 09:22:36 +0200
|
||||||
|
|
||||||
|
* Improve assignment operators for IntrusivePtr. (Dominik Charousset, Corelight)
|
||||||
|
|
||||||
|
* Fix docs for `ProcStats`: `mem` is in bytes, not KB. (Arne Welzel, Corelight)
|
||||||
|
|
||||||
4.1.0-dev.704 | 2021-06-04 08:29:18 -0700
|
4.1.0-dev.704 | 2021-06-04 08:29:18 -0700
|
||||||
|
|
||||||
* Add deprecated headers for UDP and ICMP analyzers (Tim Wojtulewicz, Corelight)
|
* Add deprecated headers for UDP and ICMP analyzers (Tim Wojtulewicz, Corelight)
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
4.1.0-dev.704
|
4.1.0-dev.708
|
||||||
|
|
|
@ -137,12 +137,29 @@ public:
|
||||||
return std::exchange(ptr_, nullptr);
|
return std::exchange(ptr_, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
IntrusivePtr& operator=(IntrusivePtr other) noexcept
|
IntrusivePtr& operator=(const IntrusivePtr& other) noexcept
|
||||||
|
{
|
||||||
|
IntrusivePtr tmp{other};
|
||||||
|
swap(tmp);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
IntrusivePtr& operator=(IntrusivePtr&& other) noexcept
|
||||||
{
|
{
|
||||||
swap(other);
|
swap(other);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IntrusivePtr& operator=(std::nullptr_t) noexcept
|
||||||
|
{
|
||||||
|
if ( ptr_ )
|
||||||
|
{
|
||||||
|
Unref(ptr_);
|
||||||
|
ptr_ = nullptr;
|
||||||
|
}
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
pointer get() const noexcept
|
pointer get() const noexcept
|
||||||
{
|
{
|
||||||
return ptr_;
|
return ptr_;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue