remove std:swap() in move-ctor

This commit is contained in:
Oliver Kowalke 2015-02-20 18:41:40 +01:00
parent d91c018653
commit 23c083e374
2 changed files with 12 additions and 12 deletions

View File

@ -66,8 +66,8 @@ pull_coroutine< T >::~pull_coroutine() {
template< typename T >
pull_coroutine< T >::pull_coroutine( pull_coroutine && other) :
cb_( nullptr) {
std::swap( cb_, other.cb_);
cb_( other.cb_) {
other.cb_ = nullptr;
}
template< typename T >
@ -134,8 +134,8 @@ pull_coroutine< T & >::~pull_coroutine() {
template< typename T >
pull_coroutine< T & >::pull_coroutine( pull_coroutine && other) :
cb_( nullptr) {
std::swap( cb_, other.cb_);
cb_( other.cb_) {
other.cb_ = nullptr;
}
template< typename T >
@ -194,8 +194,8 @@ pull_coroutine< void >::~pull_coroutine() {
inline
pull_coroutine< void >::pull_coroutine( pull_coroutine && other) :
cb_( nullptr) {
std::swap( cb_, other.cb_);
cb_( other.cb_) {
other.cb_ = nullptr;
}
inline

View File

@ -59,8 +59,8 @@ push_coroutine< T >::~push_coroutine() {
template< typename T >
push_coroutine< T >::push_coroutine( push_coroutine && other) :
cb_( nullptr) {
std::swap( cb_, other.cb_);
cb_( other.cb_) {
other.cb_ = nullptr;
}
template< typename T >
@ -122,8 +122,8 @@ push_coroutine< T & >::~push_coroutine() {
template< typename T >
push_coroutine< T & >::push_coroutine( push_coroutine && other) :
cb_( nullptr) {
std::swap( cb_, other.cb_);
cb_( other.cb_) {
other.cb_ = nullptr;
}
template< typename T >
@ -176,8 +176,8 @@ push_coroutine< void >::~push_coroutine() {
inline
push_coroutine< void >::push_coroutine( push_coroutine && other) :
cb_( nullptr) {
std::swap( cb_, other.cb_);
cb_( other.cb_) {
other.cb_ = nullptr;
}
inline