* GCC 6 defaults to -std=gnu++14, and attempting to build fldigi fails
    with a number of errors. One is that C++11 added std::next and so
    because of the "using namespace std" in src/fsq/fsq.cxx the global
    variable 'next' and std::next are ambiguous. That can be easily solved
    by qualifying ::next or adding using ::next at function scope.

  * The other errors are due to the different return type for
    std::complex<T>::real() and std::complex<T>::imag() in C++11 and
    later.
pull/4/head
Jonathan Wakely 2016-02-04 06:13:46 -06:00 zatwierdzone przez David Freese
rodzic d8089777f1
commit 813b58ad02
2 zmienionych plików z 10 dodań i 7 usunięć

Wyświetl plik

@ -1195,9 +1195,10 @@ int fsq::rx_process(const double *buf, int len)
&rx_stream[SHIFT_SIZE], // from
BLOCK_SIZE*sizeof(*rx_stream)); // # bytes
memset(fft_data, 0, sizeof(fft_data));
for (int i = 0; i < BLOCK_SIZE; i++)
fft_data[i].real() = fft_data[i].imag() =
rx_stream[i] * a_blackman[i];
for (int i = 0; i < BLOCK_SIZE; i++) {
double d = rx_stream[i] * a_blackman[i];
fft_data[i] = cmplx(d, d);
}
fft->ComplexFFT(fft_data);
process_tones();
}
@ -1449,6 +1450,7 @@ double fsq_xmtdelay() // in seconds
void fsq_repeat_last_command()
{
using ::next; // disambiguate from std::next
fsq_tx_text->clear();
fsq_tx_text->addstr(sz2utf8(commands[next].c_str()));
next++;
@ -1494,7 +1496,7 @@ void try_transmit(void *)
if (active_modem != fsq_modem) return;
if (!active_modem->fsq_squelch_open() && trx_state == STATE_RX) {
next = 0;
::next = 0;
fsq_que_clear();
//LOG_WARN("%s", "start_tx()");
start_tx();

Wyświetl plik

@ -580,9 +580,10 @@ int ifkp::rx_process(const double *buf, int len)
&rx_stream[IFKP_SHIFT_SIZE], // from
IFKP_BLOCK_SIZE*sizeof(*rx_stream)); // # bytes
memset(fft_data, 0, sizeof(fft_data));
for (int i = 0; i < IFKP_BLOCK_SIZE; i++)
fft_data[i].real() = fft_data[i].imag() =
rx_stream[i] * a_blackman[i];
for (int i = 0; i < IFKP_BLOCK_SIZE; i++) {
double d = rx_stream[i] * a_blackman[i];
fft_data[i] = cmplx(d,d);
}
fft->ComplexFFT(fft_data);
process_tones();
}