summaryrefslogtreecommitdiffstats
path: root/src/include/algorithm
diff options
context:
space:
mode:
authorStephen Cprek <smcprek@us.ibm.com>2016-11-03 16:32:31 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2016-11-14 21:32:39 -0500
commitc6644f4af2ef2c769fe32983b90e1398e5f41ba1 (patch)
tree146e0918c97b52da3328d32bf9a9eaa604db5273 /src/include/algorithm
parent7011329d47c30f6d2c6939bc1c8b9425d3eac87b (diff)
downloadtalos-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/include/algorithm')
-rw-r--r--src/include/algorithm8
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);
}
/**
OpenPOWER on IntegriCloud