Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r60780 - trunk/boost/numeric/ublas
From: guwi17_at_[hidden]
Date: 2010-03-22 18:21:27


Author: guwi17
Date: 2010-03-22 18:21:26 EDT (Mon, 22 Mar 2010)
New Revision: 60780
URL: http://svn.boost.org/trac/boost/changeset/60780

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

Text files modified:
   trunk/boost/numeric/ublas/storage.hpp | 8 ++++----
   1 files changed, 4 insertions(+), 4 deletions(-)

Modified: trunk/boost/numeric/ublas/storage.hpp
==============================================================================
--- trunk/boost/numeric/ublas/storage.hpp (original)
+++ trunk/boost/numeric/ublas/storage.hpp 2010-03-22 18:21:26 EDT (Mon, 22 Mar 2010)
@@ -1598,13 +1598,13 @@
         }
 
         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 @@
         }
 
         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);
         }
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk