mirror of
https://github.com/boostorg/coroutine2.git
synced 2025-05-09 23:24:01 +00:00
Merge pull request #15 from hamparawa/develop
Fixing a resource leak in move assignment
This commit is contained in:
commit
826f732188
@ -56,8 +56,7 @@ public:
|
||||
|
||||
pull_coroutine & operator=( pull_coroutine && other) noexcept {
|
||||
if ( this == & other) return * this;
|
||||
cb_ = other.cb_;
|
||||
other.cb_ = nullptr;
|
||||
std::swap( cb_, other.cb_);
|
||||
return * this;
|
||||
}
|
||||
|
||||
@ -168,8 +167,7 @@ public:
|
||||
|
||||
pull_coroutine & operator=( pull_coroutine && other) noexcept {
|
||||
if ( this == & other) return * this;
|
||||
cb_ = other.cb_;
|
||||
other.cb_ = nullptr;
|
||||
std::swap( cb_, other.cb_);
|
||||
return * this;
|
||||
}
|
||||
|
||||
@ -278,8 +276,7 @@ public:
|
||||
|
||||
pull_coroutine & operator=( pull_coroutine && other) noexcept {
|
||||
if ( this == & other) return * this;
|
||||
cb_ = other.cb_;
|
||||
other.cb_ = nullptr;
|
||||
std::swap( cb_, other.cb_);
|
||||
return * this;
|
||||
}
|
||||
|
||||
|
@ -54,8 +54,7 @@ public:
|
||||
|
||||
push_coroutine & operator=( push_coroutine && other) noexcept {
|
||||
if ( this == & other) return * this;
|
||||
cb_ = other.cb_;
|
||||
other.cb_ = nullptr;
|
||||
std::swap( cb_, other.cb_);
|
||||
return * this;
|
||||
}
|
||||
|
||||
@ -134,8 +133,7 @@ public:
|
||||
|
||||
push_coroutine & operator=( push_coroutine && other) noexcept {
|
||||
if ( this == & other) return * this;
|
||||
cb_ = other.cb_;
|
||||
other.cb_ = nullptr;
|
||||
std::swap( cb_, other.cb_);
|
||||
return * this;
|
||||
}
|
||||
|
||||
@ -212,8 +210,7 @@ public:
|
||||
|
||||
push_coroutine & operator=( push_coroutine && other) noexcept {
|
||||
if ( this == & other) return * this;
|
||||
cb_ = other.cb_;
|
||||
other.cb_ = nullptr;
|
||||
std::swap( cb_, other.cb_);
|
||||
return * this;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user