2
0
mirror of https://github.com/boostorg/ublas.git synced 2026-02-22 03:42:19 +00:00

storage.hpp: see #3968, applied patch to use references instead of copies in swap implementations

svn path=/trunk/boost/numeric/ublas/; revision=60780
This commit is contained in:
Gunter Winkler
2010-03-22 22:21:26 +00:00
parent ef6781c325
commit cf80d2cf66

View File

@@ -1598,13 +1598,13 @@ namespace boost { namespace numeric { namespace ublas {
}
BOOST_UBLAS_INLINE
void swap(self_type rhs) {
void swap(self_type& rhs) {
self_type tmp(rhs);
rhs = *this;
*this = tmp;
}
BOOST_UBLAS_INLINE
friend void swap(self_type lhs, self_type rhs) {
friend void swap(self_type& lhs, self_type& rhs) {
lhs.swap(rhs);
}
@@ -1770,13 +1770,13 @@ namespace boost { namespace numeric { namespace ublas {
}
BOOST_UBLAS_INLINE
void swap(self_type rhs) {
void swap(self_type& rhs) {
self_type tmp(rhs);
rhs = *this;
*this = tmp;
}
BOOST_UBLAS_INLINE
friend void swap(self_type lhs, self_type rhs) {
friend void swap(self_type& lhs, self_type& rhs) {
lhs.swap(rhs);
}