Avoid ambiguous overloading with gcc 4.9.2

master
pabr 2017-12-09 21:35:52 +01:00
rodzic 838942f195
commit fe0f0a1e9d
4 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -91,7 +91,7 @@ void run(config &cfg) {
// CONVOLUTIONAL CODER
cstln_lut<256> *cstln = make_dvbs2_constellation(cfg.constellation, cfg.fec);
int bits_per_symbol = log2(cstln->nsymbols);
int bits_per_symbol = log2i(cstln->nsymbols);
if ( cfg.fec==FEC23 && (cstln->nsymbols==4 ||
cstln->nsymbols==64) ) {

Wyświetl plik

@ -1212,7 +1212,7 @@ namespace leansdr {
resync_phase(0),
resync_period(32) // 1/32 = 9% synchronization overhead TBD
{
bits_per_symbol = log2(cstln->nsymbols);
bits_per_symbol = log2i(cstln->nsymbols);
fec = &fec_specs[cr];
{ // Sanity check: FEC block size must be a multiple of label size.
int symbols_per_block = fec->bits_out / bits_per_symbol;

Wyświetl plik

@ -67,7 +67,7 @@ namespace leansdr {
return parity((uint32_t)(x^(x>>32)));
}
int log2(uint64_t x) {
int log2i(uint64_t x) {
int n = -1;
for ( ; x; ++n,x>>=1 ) ;
return n;

Wyświetl plik

@ -47,7 +47,7 @@ namespace leansdr {
exit(1);
}
// Derive number of polynomials from NCS.
int nG = log2(NCS);
int nG = log2i(NCS);
for ( TS s=0; s<NSTATES; ++s ) {
for ( TUS us=0; us<NUS; ++us ) {