Address implicit cast compiler warnings.

This commit is contained in:
Jared Boone 2015-09-28 11:03:20 -07:00
parent 0bc8f551de
commit f918a774b7
2 changed files with 6 additions and 2 deletions

View File

@ -86,7 +86,11 @@ void FSKProcessor::execute(buffer_c8_t buffer) {
// TODO: Factor out this hidden decimation magic.
for(size_t i=0; i<channel.count; i+=4) {
std::complex<float> sample { channel.p[i].real(), channel.p[i].imag() };
// TODO: No idea why implicit cast int16_t->float is not allowed.
const std::complex<float> sample {
static_cast<float>(channel.p[i].real()),
static_cast<float>(channel.p[i].imag())
};
mf_0.execute_once(sample);
if( mf_1.execute_once(sample) ) {
const auto value_0 = mf_0.get_output();

View File

@ -80,7 +80,7 @@ private:
};
clock_recovery::ClockRecovery clock_recovery {
sampling_rate / 4,
static_cast<float>(sampling_rate / 4),
9600,
[this](const float symbol) { this->consume_symbol(symbol); }
};