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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user