[med-svn] [aghermann] 13/13: more move semantics

andrei zavada hmmr-guest at alioth.debian.org
Wed Aug 28 22:10:25 UTC 2013


This is an automated email from the git hooks/post-receive script.

hmmr-guest pushed a commit to branch master
in repository aghermann.

commit d98386b2aff1a1fc2a37a67b64c36045916dbcf4
Author: Andrei Zavada <johnhommer at gmail.com>
Date:   Thu Aug 29 01:10:04 2013 +0300

    more move semantics
---
 upstream/src/common/alg.hh         |    2 +-
 upstream/src/common/fs.hh          |    4 ++--
 upstream/src/libsigproc/exstrom.hh |   28 ++++++++++++++--------------
 3 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/upstream/src/common/alg.hh b/upstream/src/common/alg.hh
index 5a04b46..acf45ec 100644
--- a/upstream/src/common/alg.hh
+++ b/upstream/src/common/alg.hh
@@ -166,7 +166,7 @@ to_vad( const valarray<float>& rv)
 	valarray<double> ret (rv.size());
 	for ( size_t i = 0; i < rv.size(); ++i )
 		ret[i] = rv[i];
-	return ret;
+	return move(ret);
 }
 
 
diff --git a/upstream/src/common/fs.hh b/upstream/src/common/fs.hh
index 0c6423f..ef170fc 100644
--- a/upstream/src/common/fs.hh
+++ b/upstream/src/common/fs.hh
@@ -34,7 +34,7 @@ make_fname_base( const string& fname_, const string& suffices, TMakeFnameOption)
 inline list<string>
 path_elements( const string& _filename)
 {
-	return agh::str::tokens( _filename, "/");
+	return move(agh::str::tokens( _filename, "/"));
 }
 
 inline string
@@ -43,7 +43,7 @@ dirname( const string& _filename)
 	string pre = (_filename[0] == '/') ? "/" : "";
 	auto ee = agh::str::tokens( _filename, "/");
 	ee.pop_back();
-	return pre + agh::str::join( ee, "/");
+	return move(pre + agh::str::join( ee, "/"));
 }
 
 
diff --git a/upstream/src/libsigproc/exstrom.hh b/upstream/src/libsigproc/exstrom.hh
index 480f7cf..0741676 100644
--- a/upstream/src/libsigproc/exstrom.hh
+++ b/upstream/src/libsigproc/exstrom.hh
@@ -113,7 +113,7 @@ binomial_mult( unsigned n, const valarray<T>& p)
 		a[0] += p[2*i  ];
 		a[1] += p[2*i+1];
 	}
-	return  a;
+	return move(a);
 }
 
 
@@ -179,7 +179,7 @@ trinomial_mult( unsigned n, const valarray<T>& b, const valarray<T>& c)
 		a[1] += b[2*i+1];
 	}
 
-	return a;
+	return move(a);
 }
 
 /**********************************************************************
@@ -224,7 +224,7 @@ dcof_bwlp( unsigned n, T fcf)
 	for ( k = 3; k <= n; ++k )
 		dcof[k] = dcof[2*k-2];
 
-	return dcof;
+	return move(dcof);
 }
 
 
@@ -237,7 +237,7 @@ template <typename T>
 valarray<T>
 dcof_bwhp( unsigned n, T fcf)
 {
-	return dcof_bwlp( n, fcf);
+	return move(dcof_bwlp( n, fcf));
 }
 
 
@@ -292,7 +292,7 @@ dcof_bwbp( unsigned n, T f1f, T f2f)
 	dcof[0] = 1.0;
 	for ( k = 3; k <= 2*n; ++k )
 		dcof[k] = dcof[2*k-2];
-	return dcof;
+	return move(dcof);
 }
 
 
@@ -322,7 +322,7 @@ ccof_bwlp( unsigned n)
 	ccof[n-1] = n;
 	ccof[n] = 1;
 
-	return ccof;
+	return move(ccof);
 }
 
 
@@ -341,7 +341,7 @@ ccof_bwhp( unsigned n)
 		if ( i % 2 )
 			ccof[i] = -ccof[i];
 
-	return ccof;
+	return move(ccof);
 }
 
 
@@ -365,12 +365,12 @@ ccof_bwbp( unsigned n)
 		ccof[2*i+1] = 0.0;
 	}
 	ccof[2*n] = tcof[n];
-	return ccof;
+	return move(ccof);
 }
 
 
 /**********************************************************************
-  ccof_bwbs - calculates the c coefficients for a butterworth bandstop 
+  ccof_bwbs - calculates the c coefficients for a butterworth bandstop
   filter. The coefficients are returned as an array of integers.
 
 */
@@ -396,7 +396,7 @@ ccof_bwbs( unsigned n, T f1f, T f2f)
 		ccof[1] += alpha;
 	}
 
-	return ccof;
+	return move(ccof);
 }
 
 
@@ -578,7 +578,7 @@ low_pass( const valarray<T>& in,
 		out[i] = s2 - s1;
 	}
 
-	return out;
+	return move(out);
 }
 
 
@@ -630,7 +630,7 @@ high_pass( const valarray<T>& in,
 		out[i] = s2 - s1;
 	}
 
-	return out;
+	return move(out);
 }
 
 
@@ -687,7 +687,7 @@ band_pass( const valarray<T>& in,
 		out[i] = s2 - s1;
 	}
 
-	return out;
+	return move(out);
 }
 
 
@@ -742,7 +742,7 @@ band_stop( const valarray<T>& in,
 		out[i] = s2 - s1;
 	}
 
-	return out;
+	return move(out);
 }
 
 

-- 
Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git



More information about the debian-med-commit mailing list