From: Pierre Moreau Date: Thu, 7 May 2020 08:38:48 +0000 (+0200) Subject: clover: Address unnecessary copy warnings X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8635c28a9264e24e5f0b64e68af31024945cda98;p=mesa.git clover: Address unnecessary copy warnings Signed-off-by: Pierre Moreau Reviewed-by: Francisco Jerez Part-of: --- 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: