diff options
author | Hauke Heibel <hauke.heibel@gmail.com> | 2010-02-03 19:20:25 +0100 |
---|---|---|
committer | Hauke Heibel <hauke.heibel@gmail.com> | 2010-02-03 19:20:25 +0100 |
commit | 1a77334d5435f8edd6d7d756222207a8e3f268a6 (patch) | |
tree | dd1bee59b86fb434bc6b7194d1c05d60067da56d /unsupported/Eigen/FFT | |
parent | 05837be8fb373d69840c5a1b0a0be14a1c52639b (diff) |
Silenced type conversion warnings.
Diffstat (limited to 'unsupported/Eigen/FFT')
-rw-r--r-- | unsupported/Eigen/FFT | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/unsupported/Eigen/FFT b/unsupported/Eigen/FFT index 8702120de..0cc10bafb 100644 --- a/unsupported/Eigen/FFT +++ b/unsupported/Eigen/FFT @@ -187,7 +187,7 @@ class FFT { m_impl.inv( dst,src,nfft ); if ( HasFlag( Unscaled ) == false) - scale(dst,1./nfft,nfft); + scale(dst,_Scalar(1./nfft),nfft); } inline @@ -237,8 +237,14 @@ class FFT private: template <typename _It,typename _Val> - inline - void scale(_It x,_Val s,int nx) + inline void scale(_It x,_Val s,int nx) + { + for (int k=0;k<nx;++k) + *x++ *= _Scalar(s); + } + + template <typename _Val> + inline void scale(std::complex<_Val>* x,_Val s,int nx) { for (int k=0;k<nx;++k) *x++ *= s; |