[med-svn] [SCM] aghermann branch, master, updated. 4b06a66467a52311d413e817136ece62c0e9c24a

Andrei Zavada johnhommer at gmail.com
Sun Jul 21 19:56:34 UTC 2013


The following commit has been merged in the master branch:
commit b32b64720d5f20ce7826e7ff103c687f3d69c39a
Author: Andrei Zavada <johnhommer at gmail.com>
Date:   Wed Jul 17 17:08:11 2013 +0300

    some c++11 hints

diff --git a/src/common/libcommon.cc b/src/common/libcommon.cc
index 1df7f72..1120884 100644
--- a/src/common/libcommon.cc
+++ b/src/common/libcommon.cc
@@ -46,7 +46,7 @@ trim( const string& r0)
 		--rsize;
 	r.resize( rsize);
 	r.erase( 0, r.find_first_not_of(" \t"));
-	return r;
+	return move(r);
 }
 
 string
@@ -55,7 +55,7 @@ pad( const string& r0, size_t to)
 {
 	string r (to, ' ');
 	memcpy( (void*)r.data(), (const void*)r0.data(), min( to, r0.size()));
-	return r;
+	return move(r);
 }
 
 
@@ -73,7 +73,7 @@ sasprintf( const char* fmt, ...)
 
 	string ret {_};
 	free( (void*)_);
-	return ret;
+	return move(ret);
 }
 
 
@@ -90,7 +90,7 @@ tokens_trimmed( const string& s_, const char* sep)
 		acc.emplace_back( trim(p));
 		p = strtok_r( NULL, sep, &pp);
 	}
-	return acc;
+	return move(acc);
 }
 
 list<string>
@@ -105,7 +105,7 @@ tokens( const string& s_, const char* sep)
 		acc.emplace_back( p);
 		p = strtok_r( NULL, sep, &pp);
 	}
-	return acc;
+	return move(acc);
 }
 
 

-- 
Sleep experiment manager



More information about the debian-med-commit mailing list