Mesa (master): clover: Address unnecessary copy warnings
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu May 21 11:16:20 UTC 2020
Module: Mesa
Branch: master
Commit: 8635c28a9264e24e5f0b64e68af31024945cda98
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8635c28a9264e24e5f0b64e68af31024945cda98
Author: Pierre Moreau <dev at pmoreau.org>
Date: Thu May 7 10:38:48 2020 +0200
clover: Address unnecessary copy warnings
Signed-off-by: Pierre Moreau <dev at pmoreau.org>
Reviewed-by: Francisco Jerez <currojerez at riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4943>
---
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<typename E> void
fail(std::string &r_log, E &&e, const std::string &s) {
r_log += s;
- throw e;
+ throw std::forward<E>(e);
}
inline std::vector<std::string>
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<S>(it);
}
private:
More information about the mesa-commit
mailing list