]> git.lyx.org Git - lyx.git/blobdiff - src/support/copied_ptr.h
Merge branch 'master' of git.lyx.org:lyx
[lyx.git] / src / support / copied_ptr.h
index 1bf94d349abf8453517a20f52cc0918d8790c532..15ef7551e3be0356e273b093941c7690b9df815c 100644 (file)
@@ -48,7 +48,6 @@ public:
 
 private:
        T * ptr_;
-       void swap(copied_ptr &);
 };
 
 
@@ -76,7 +75,7 @@ copied_ptr<T, Traits> & copied_ptr<T, Traits>::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<T, Traits>::get() const
        return ptr_;
 }
 
-
-template <typename T, typename Traits>
-void copied_ptr<T, Traits>::swap(copied_ptr & other)
-{
-       std::swap( ptr_, other.ptr_ );
-}
-
 } // namespace support
 } // namespace lyx