diff options
author | Tom Rondeau | 2012-12-17 16:09:34 -0500 |
---|---|---|
committer | Tom Rondeau | 2012-12-17 16:09:34 -0500 |
commit | b15b38df132ae662c1b9e3ebe5ea5ba4f7180afa (patch) | |
tree | 665689964fab0ec99c42e66e8119320516cbbf86 /gruel/src/lib/pmt | |
parent | c866b5ea38dbabcfa08ae3e9989ad5ddfbebfbbe (diff) | |
download | gnuradio-b15b38df132ae662c1b9e3ebe5ea5ba4f7180afa.tar.gz gnuradio-b15b38df132ae662c1b9e3ebe5ea5ba4f7180afa.tar.bz2 gnuradio-b15b38df132ae662c1b9e3ebe5ea5ba4f7180afa.zip |
gruel: changing PMT (de)serialize of complex to make more portable (apparently; for OSX).
Diffstat (limited to 'gruel/src/lib/pmt')
-rw-r--r-- | gruel/src/lib/pmt/pmt_serialize.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gruel/src/lib/pmt/pmt_serialize.cc b/gruel/src/lib/pmt/pmt_serialize.cc index 1ee7ca1fe..24be6b772 100644 --- a/gruel/src/lib/pmt/pmt_serialize.cc +++ b/gruel/src/lib/pmt/pmt_serialize.cc @@ -711,12 +711,12 @@ pmt_deserialize(std::streambuf &sb) { pmt_t vec = pmt_make_c32vector(nitems, 0); for(uint32_t i=0; i<nitems; i++) { - std::complex<float> c; + float re, im; deserialize_untagged_f64(&f64, sb); - c.real(static_cast<float>(f64)); + re = static_cast<float>(f64); deserialize_untagged_f64(&f64, sb); - c.imag(static_cast<float>(f64)); - pmt_c32vector_set(vec, i, c); + im = static_cast<float>(f64); + pmt_c32vector_set(vec, i, std::complex<float>(re, im)); } return vec; } @@ -725,12 +725,12 @@ pmt_deserialize(std::streambuf &sb) { pmt_t vec = pmt_make_c64vector(nitems, 0); for(uint32_t i=0; i<nitems; i++) { - std::complex<double> c; + double re, im; deserialize_untagged_f64(&f64, sb); - c.real(f64); + re = f64; deserialize_untagged_f64(&f64, sb); - c.imag(f64); - pmt_c64vector_set(vec, i, c); + im = f64; + pmt_c64vector_set(vec, i, std::complex<double>(re, im)); } return vec; } |