diff options
author | Slávek Banko <[email protected]> | 2015-06-28 15:43:43 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2015-06-28 15:49:36 +0200 |
commit | 06aaf8471b1185e5c132068feb9bede797c5ded0 (patch) | |
tree | ccca00de9687a01988fe2892699852c6790ed536 /tdescreensaver/kdesavers/vec3.h | |
parent | b99cb353e5a83bd2a06c457933e7552a8ac6a2eb (diff) | |
download | tdeartwork-06aaf8471b1185e5c132068feb9bede797c5ded0.tar.gz tdeartwork-06aaf8471b1185e5c132068feb9bede797c5ded0.zip |
Fix FTBFS with clang
[taken from NetBSD kdeartwork3 patches]
(cherry picked from commit 23c3263f1b2b48b729f3877e93abcd9788d7893f)
Diffstat (limited to 'tdescreensaver/kdesavers/vec3.h')
-rw-r--r-- | tdescreensaver/kdesavers/vec3.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tdescreensaver/kdesavers/vec3.h b/tdescreensaver/kdesavers/vec3.h index 62aeb8ed..879c55f7 100644 --- a/tdescreensaver/kdesavers/vec3.h +++ b/tdescreensaver/kdesavers/vec3.h @@ -148,7 +148,9 @@ inline vec3<T>::vec3(const std::slice_array<T>& a) template<typename T> inline vec3<T> operator+(vec3<T> a, const vec3<T>& b) { - a += b; /* valarray<T>::operator+=(const valarray<T>&) */ + std::valarray<T> &a_ = a; + const std::valarray<T> &b_ = b; + a_ += b_; /* valarray<T>::operator+=(const valarray<T>&) */ return a; } @@ -158,7 +160,9 @@ inline vec3<T> operator+(vec3<T> a, const vec3<T>& b) template<typename T> inline T operator*(vec3<T> a, const vec3<T>& b) { - a *= b; /* valarray<T>::operator*=(const T&) */ + std::valarray<T> &a_ = a; + const std::valarray<T> &b_ = b; + a_ *= b_; /* valarray<T>::operator*=(const valarray<T>&) */ return a.sum(); } |