X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fsupport%2Fcopied_ptr.h;h=15ef7551e3be0356e273b093941c7690b9df815c;hb=b917c4e40f9f5cd3d101444600eddafcca54d6e3;hp=1bf94d349abf8453517a20f52cc0918d8790c532;hpb=de7312a1229df0006fcd81552566f4590c966475;p=lyx.git diff --git a/src/support/copied_ptr.h b/src/support/copied_ptr.h index 1bf94d349a..15ef7551e3 100644 --- a/src/support/copied_ptr.h +++ b/src/support/copied_ptr.h @@ -48,7 +48,6 @@ public: private: T * ptr_; - void swap(copied_ptr &); }; @@ -76,7 +75,7 @@ copied_ptr & copied_ptr::operator=(copied_ptr const & othe { if (&other != this) { copied_ptr temp(other); - swap(temp); + std::swap(ptr_, temp.ptr_); } return *this; } @@ -102,13 +101,6 @@ T * copied_ptr::get() const return ptr_; } - -template -void copied_ptr::swap(copied_ptr & other) -{ - std::swap( ptr_, other.ptr_ ); -} - } // namespace support } // namespace lyx