diff options
author | Stephen Cprek <smcprek@us.ibm.com> | 2016-11-03 16:32:31 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-11-14 21:32:39 -0500 |
commit | c6644f4af2ef2c769fe32983b90e1398e5f41ba1 (patch) | |
tree | 146e0918c97b52da3328d32bf9a9eaa604db5273 /src | |
parent | 7011329d47c30f6d2c6939bc1c8b9425d3eac87b (diff) | |
download | talos-hostboot-c6644f4af2ef2c769fe32983b90e1398e5f41ba1.tar.gz talos-hostboot-c6644f4af2ef2c769fe32983b90e1398e5f41ba1.zip |
Change std::swap() to use std::move()
Change-Id: Iff04f52ea95b8ea609041cb0c50e8e689e5b0d1c
RTC:162287
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/32206
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Martin Gloff <mgloff@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/include/algorithm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/include/algorithm b/src/include/algorithm index cc3886ff5..8d7d6f62f 100644 --- a/src/include/algorithm +++ b/src/include/algorithm @@ -27,6 +27,7 @@ #include <iterator> #include <util/impl/qsort.H> +#include <utility> #ifdef __cplusplus namespace std @@ -119,10 +120,9 @@ namespace std inline void swap(T& a, T&b ) { - // @TODO RTC:162287 use std::move() - T c(a); - a=b; - b=c; + T tmp(std::move(a)); + a = std::move(b); + b = std::move(tmp); } /** |