From 06aaf8471b1185e5c132068feb9bede797c5ded0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sun, 28 Jun 2015 15:43:43 +0200 Subject: Fix FTBFS with clang [taken from NetBSD kdeartwork3 patches] (cherry picked from commit 23c3263f1b2b48b729f3877e93abcd9788d7893f) --- tdescreensaver/kdesavers/vec3.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tdescreensaver/kdesavers/vec3.h') 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::vec3(const std::slice_array& a) template inline vec3 operator+(vec3 a, const vec3& b) { - a += b; /* valarray::operator+=(const valarray&) */ + std::valarray &a_ = a; + const std::valarray &b_ = b; + a_ += b_; /* valarray::operator+=(const valarray&) */ return a; } @@ -158,7 +160,9 @@ inline vec3 operator+(vec3 a, const vec3& b) template inline T operator*(vec3 a, const vec3& b) { - a *= b; /* valarray::operator*=(const T&) */ + std::valarray &a_ = a; + const std::valarray &b_ = b; + a_ *= b_; /* valarray::operator*=(const valarray&) */ return a.sum(); } -- cgit v1.2.1