clover: Address unnecessary copy warnings
authorPierre Moreau <dev@pmoreau.org>
Thu, 7 May 2020 08:38:48 +0000 (10:38 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 21 May 2020 10:58:05 +0000 (10:58 +0000)
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4943>

src/gallium/frontends/clover/llvm/util.hpp
src/gallium/frontends/clover/util/functional.hpp

index 02e73e650718bee1124e34cab8d622d530fc9093..c3c8890fd077c61269bd81c594f4637dd9ec32b2 100644 (file)
@@ -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>
index fc281c5c79a6a139dd1fdf22c02d43755d3d7979..bf374c6b199956f20831957d1fc49ece78a94387 100644 (file)
@@ -266,7 +266,7 @@ namespace clover {
       S
       operator()(S &&it) const {
          std::advance(it, n);
-         return it;
+         return std::forward<S>(it);
       }
 
    private: