aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/convert
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-11-13 17:22:49 -0800
committerJosh Blum <josh@joshknows.com>2011-11-13 17:22:49 -0800
commit986f6f8d0b14c4e56468c1c8887fadb2dc4e1463 (patch)
treefd725b1f504a3441762717d7d21a8819a2e13d9a /host/lib/convert
parent7a1bd6135ad7201f4a23ee71d929ae15de26a103 (diff)
downloaduhd-986f6f8d0b14c4e56468c1c8887fadb2dc4e1463.tar.gz
uhd-986f6f8d0b14c4e56468c1c8887fadb2dc4e1463.tar.bz2
uhd-986f6f8d0b14c4e56468c1c8887fadb2dc4e1463.zip
convert: msvc warning fixes for sc8 table gen
Diffstat (limited to 'host/lib/convert')
-rw-r--r--host/lib/convert/convert_with_tables.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/host/lib/convert/convert_with_tables.cpp b/host/lib/convert/convert_with_tables.cpp
index bcb7ec2c7..c45415d5d 100644
--- a/host/lib/convert/convert_with_tables.cpp
+++ b/host/lib/convert/convert_with_tables.cpp
@@ -70,7 +70,9 @@ public:
void set_scalar(const double scalar){
for (size_t i = 0; i < sc16_table_len; i++){
const boost::uint16_t val = tohost(boost::uint16_t(i & 0xffff));
- _table[i] = std::complex<type>(boost::int8_t(val >> 8)*scalar, boost::int8_t(val >> 0)*scalar);
+ const type real = type(boost::int8_t(val >> 8)*scalar);
+ const type imag = type(boost::int8_t(val >> 0)*scalar);
+ _table[i] = std::complex<type>(real, imag);
}
}