From 8635c28a9264e24e5f0b64e68af31024945cda98 Mon Sep 17 00:00:00 2001 From: Pierre Moreau Date: Thu, 7 May 2020 10:38:48 +0200 Subject: [PATCH] clover: Address unnecessary copy warnings Signed-off-by: Pierre Moreau Reviewed-by: Francisco Jerez Part-of: --- src/gallium/frontends/clover/llvm/util.hpp | 2 +- src/gallium/frontends/clover/util/functional.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/frontends/clover/llvm/util.hpp b/src/gallium/frontends/clover/llvm/util.hpp index 02e73e65071..c3c8890fd07 100644 --- a/src/gallium/frontends/clover/llvm/util.hpp +++ b/src/gallium/frontends/clover/llvm/util.hpp @@ -37,7 +37,7 @@ namespace clover { template void fail(std::string &r_log, E &&e, const std::string &s) { r_log += s; - throw e; + throw std::forward(e); } inline std::vector diff --git a/src/gallium/frontends/clover/util/functional.hpp b/src/gallium/frontends/clover/util/functional.hpp index fc281c5c79a..bf374c6b199 100644 --- a/src/gallium/frontends/clover/util/functional.hpp +++ b/src/gallium/frontends/clover/util/functional.hpp @@ -266,7 +266,7 @@ namespace clover { S operator()(S &&it) const { std::advance(it, n); - return it; + return std::forward(it); } private: -- 2.30.2